Struct storage_api::BorrowedStorage
source · [−]pub struct BorrowedStorage<'a, DataStore> { /* private fields */ }
Expand description
A single storage which stores memory in borrowed space.
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
sourceimpl<'a, DataStore> BorrowedStorage<'a, DataStore>
impl<'a, DataStore> BorrowedStorage<'a, DataStore>
Trait Implementations
sourceimpl<DataStore> Storage for BorrowedStorage<'_, DataStore>
impl<DataStore> Storage for BorrowedStorage<'_, 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<'a, DataStore> RefUnwindSafe for BorrowedStorage<'a, DataStore> where
DataStore: RefUnwindSafe,
impl<'a, DataStore> Send for BorrowedStorage<'a, DataStore> where
DataStore: Send,
impl<'a, DataStore> Sync for BorrowedStorage<'a, DataStore> where
DataStore: Sync,
impl<'a, DataStore> Unpin for BorrowedStorage<'a, DataStore>
impl<'a, DataStore> !UnwindSafe for BorrowedStorage<'a, DataStore>
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