pub struct WeeAlloc<'a> { /* private fields */ }
Expand description
A wee allocator.
§Safety
When used in unix environments, cannot move in memory. Typically not an
issue if you’re just using this as a static
global allocator.
Implementations§
Trait Implementations§
Source§impl GlobalAlloc for WeeAlloc<'static>
impl GlobalAlloc for WeeAlloc<'static>
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<'a> Sync for WeeAlloc<'a>
Auto Trait Implementations§
impl<'a> !Freeze for WeeAlloc<'a>
impl<'a> !RefUnwindSafe for WeeAlloc<'a>
impl<'a> !Send for WeeAlloc<'a>
impl<'a> Unpin for WeeAlloc<'a>
impl<'a> !UnwindSafe for WeeAlloc<'a>
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