Struct storage_api::InlineStorage
source · [−]#[repr(transparent)]pub struct InlineStorage<DataStore> { /* private fields */ }
Expand description
A single storage which stores memory inline.
The DataStore
type parameter determines the layout of the inline storage.
(It would be nice to use const LAYOUT: Layout
instead, but the needed
features are currently a little too incomplete to be usable here yet.)
Implementations
Trait Implementations
sourceimpl<DataStore> Storage for InlineStorage<DataStore>
impl<DataStore> Storage for InlineStorage<DataStore>
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
Auto Trait Implementations
impl<DataStore> RefUnwindSafe for InlineStorage<DataStore> where
DataStore: RefUnwindSafe,
impl<DataStore> Send for InlineStorage<DataStore> where
DataStore: Send,
impl<DataStore> Sync for InlineStorage<DataStore> where
DataStore: Sync,
impl<DataStore> Unpin for InlineStorage<DataStore> where
DataStore: Unpin,
impl<DataStore> UnwindSafe for InlineStorage<DataStore> where
DataStore: 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