pub struct NeverAlloc;
Expand description
NeverAlloc
is an implementation for GlobalAlloc
, which always fails.
For example, NeverAlloc::alloc
always returns a null pointer.
Trait Implementations§
Source§impl Clone for NeverAlloc
impl Clone for NeverAlloc
Source§fn clone(&self) -> NeverAlloc
fn clone(&self) -> NeverAlloc
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for NeverAlloc
impl Debug for NeverAlloc
Source§impl Default for NeverAlloc
impl Default for NeverAlloc
Source§impl GlobalAlloc for NeverAlloc
impl GlobalAlloc for NeverAlloc
Source§unsafe fn alloc(&self, _layout: Layout) -> *mut u8
unsafe fn alloc(&self, _layout: Layout) -> *mut u8
Allocates memory as described by the given
layout
. Read moreimpl Copy for NeverAlloc
Auto Trait Implementations§
impl Freeze for NeverAlloc
impl RefUnwindSafe for NeverAlloc
impl Send for NeverAlloc
impl Sync for NeverAlloc
impl Unpin for NeverAlloc
impl UnwindSafe for NeverAlloc
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