#[repr(C)]pub struct StdAllocator;
Expand description
Trait Implementations§
Source§impl Allocator for StdAllocator
impl Allocator for StdAllocator
Source§type SpecificAllocationError = AllocationError
type SpecificAllocationError = AllocationError
A specific Allocator error. Implementor can add additional
information to the error, not only generic “allocation failed”.
Source§fn allocate(
&self,
layout: Layout,
) -> Result<NonNull<u8>, Self::SpecificAllocationError>
fn allocate( &self, layout: Layout, ) -> Result<NonNull<u8>, Self::SpecificAllocationError>
Allocates new piece of memory. This is the only safe
function here. The returned
ptr
is guaranteed to satisfy
layout
requirements (although the implementation is free
to overallocate and strengthen alignment). Read moreSource§impl Clone for StdAllocator
impl Clone for StdAllocator
Source§fn clone(&self) -> StdAllocator
fn clone(&self) -> StdAllocator
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for StdAllocator
impl Debug for StdAllocator
Source§impl Default for StdAllocator
impl Default for StdAllocator
Source§fn default() -> StdAllocator
fn default() -> StdAllocator
Returns the “default value” for a type. Read more
impl Copy for StdAllocator
Auto Trait Implementations§
impl Freeze for StdAllocator
impl RefUnwindSafe for StdAllocator
impl Send for StdAllocator
impl Sync for StdAllocator
impl Unpin for StdAllocator
impl UnwindSafe for StdAllocator
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more