Struct gharial::NeverAlloc
source · 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 copy 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 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
Allocate memory as described by the given
layout
. Read more