pub struct BogoAlloc<const SIZE: usize> { /* private fields */ }Expand description
Returns a totally memory safe allocator, with a fixed size heap-capacity
Implementations§
Trait Implementations§
Source§impl<const SIZE: usize> GlobalAlloc for BogoAlloc<SIZE>
impl<const SIZE: usize> GlobalAlloc for BogoAlloc<SIZE>
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 moreAuto Trait Implementations§
impl<const SIZE: usize> !Freeze for BogoAlloc<SIZE>
impl<const SIZE: usize> RefUnwindSafe for BogoAlloc<SIZE>
impl<const SIZE: usize> Send for BogoAlloc<SIZE>
impl<const SIZE: usize> Sync for BogoAlloc<SIZE>
impl<const SIZE: usize> Unpin for BogoAlloc<SIZE>
impl<const SIZE: usize> UnwindSafe for BogoAlloc<SIZE>
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