Struct storage_api::AllocStorage
source · [−]pub struct AllocStorage<A: Allocator> { /* private fields */ }
Expand description
A storage that stores objects via an Allocator
.
Implementations
sourceimpl<A: Allocator> AllocStorage<A>
impl<A: Allocator> AllocStorage<A>
Trait Implementations
sourceimpl<A: Allocator> MultipleStorage for AllocStorage<A>
impl<A: Allocator> MultipleStorage for AllocStorage<A>
sourceimpl<A: Allocator> Storage for AllocStorage<A>
impl<A: Allocator> Storage for AllocStorage<A>
type Handle = AllocHandle
type Handle = AllocHandle
The handle which is used to access the stored memory. Read more
sourcefn allocate(&mut self, layout: Layout) -> Result<Self::Handle, AllocError>
fn allocate(&mut self, layout: Layout) -> Result<Self::Handle, AllocError>
Allocate memory handle in this storage. Read more
sourceunsafe fn deallocate(&mut self, handle: Self::Handle, layout: Layout)
unsafe fn deallocate(&mut self, handle: Self::Handle, layout: Layout)
Deallocate an object handle in this storage. Read more
sourceunsafe fn resolve(&self, handle: Self::Handle, layout: Layout) -> &Memory
unsafe fn resolve(&self, handle: Self::Handle, layout: Layout) -> &Memory
Resolve a memory handle in this storage to a reference. Read more
sourceunsafe fn resolve_mut(
&mut self,
handle: Self::Handle,
layout: Layout
) -> &mut Memory
unsafe fn resolve_mut(
&mut self,
handle: Self::Handle,
layout: Layout
) -> &mut Memory
Resolve a memory handle in this storage to a mutable reference. Read more
impl<A: Allocator> PinningStorage for AllocStorage<A>
Auto Trait Implementations
impl<A> RefUnwindSafe for AllocStorage<A> where
A: RefUnwindSafe,
impl<A> Send for AllocStorage<A> where
A: Send,
impl<A> Sync for AllocStorage<A> where
A: Sync,
impl<A> Unpin for AllocStorage<A> where
A: Unpin,
impl<A> UnwindSafe for AllocStorage<A> where
A: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more