pub struct NullAlloc;
Trait Implementations§
source§impl Allocator for NullAlloc
impl Allocator for NullAlloc
source§unsafe fn alloc_buf<F>(
&self,
_layout: Layout,
_f: F
) -> Result<NonNull<[u8]>, Error>
unsafe fn alloc_buf<F>( &self, _layout: Layout, _f: F ) -> Result<NonNull<[u8]>, Error>
Safety Read more
source§unsafe fn alloc_slice_then<T, F>(
&self,
len: usize,
f: F
) -> Result<NonNull<[T]>, Error>
unsafe fn alloc_slice_then<T, F>( &self, len: usize, f: F ) -> Result<NonNull<[T]>, Error>
Safety Read more
source§unsafe fn init_slice<T: Clone>(
&self,
len: usize,
val: T
) -> Result<NonNull<[T]>, Error>
unsafe fn init_slice<T: Clone>( &self, len: usize, val: T ) -> Result<NonNull<[T]>, Error>
Safety Read more
source§unsafe fn zeroed_slice<T>(
&self,
len: usize
) -> Result<NonNull<[MaybeUninit<T>]>, Error>
unsafe fn zeroed_slice<T>( &self, len: usize ) -> Result<NonNull<[MaybeUninit<T>]>, Error>
Safety Read more
source§unsafe fn uninit_slice<T>(
&self,
len: usize
) -> Result<NonNull<[MaybeUninit<T>]>, Error>
unsafe fn uninit_slice<T>( &self, len: usize ) -> Result<NonNull<[MaybeUninit<T>]>, Error>
Safety Read more
source§impl GlobalAlloc for NullAlloc
impl GlobalAlloc for NullAlloc
source§unsafe fn alloc(&self, _layout: Layout) -> *mut u8
unsafe fn alloc(&self, _layout: Layout) -> *mut u8
Allocate memory as described by the given
layout
. Read moresource§impl Ord for NullAlloc
impl Ord for NullAlloc
source§impl PartialEq for NullAlloc
impl PartialEq for NullAlloc
source§impl PartialOrd for NullAlloc
impl PartialOrd for NullAlloc
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for NullAlloc
impl Eq for NullAlloc
impl StructuralEq for NullAlloc
impl StructuralPartialEq for NullAlloc
Auto Trait Implementations§
impl RefUnwindSafe for NullAlloc
impl Send for NullAlloc
impl Sync for NullAlloc
impl Unpin for NullAlloc
impl UnwindSafe for NullAlloc
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