pub struct Locked<T> { /* private fields */ }
Implementations
Trait Implementations
sourceimpl<A: Allocator> GlobalAlloc for Locked<A>
impl<A: Allocator> GlobalAlloc for Locked<A>
sourceunsafe 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
sourceunsafe fn dealloc(&self, addr: *mut u8, layout: Layout)
unsafe fn dealloc(&self, addr: *mut u8, layout: Layout)
Deallocate the block of memory at the given ptr
pointer with the given layout
. Read more
1.28.0unsafe fn alloc_zeroed(&self, layout: Layout) -> *mut u8
unsafe fn alloc_zeroed(&self, layout: Layout) -> *mut u8
Behaves like alloc
, but also ensures that the contents
are set to zero before being returned. Read more
Auto Trait Implementations
impl<T> !RefUnwindSafe for Locked<T>
impl<T> Send for Locked<T> where
T: Send,
impl<T> !Sync for Locked<T>
impl<T> Unpin for Locked<T> where
T: Unpin,
impl<T> UnwindSafe for Locked<T> where
T: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more