pub struct SlotStorage<'a> { /* private fields */ }Expand description
Represents a buffer of bytes that can be allocated from
This is similar to InlineStorage but because it doesnt store its buffer directly,
it can potentially allocate memory with large alignments that are not known at compile time
Trait Implementations§
Source§impl Storage for SlotStorage<'_>
impl Storage for SlotStorage<'_>
Source§type Handle = SlotStorageHandle
type Handle = SlotStorageHandle
The
StorageHandle type that represents an allocation by this StorageSource§unsafe fn resolve(&self, handle: Self::Handle) -> NonNull<()>
unsafe fn resolve(&self, handle: Self::Handle) -> NonNull<()>
Returns a pointer to the allocation represented by
handle Read moreSource§fn allocate(
&self,
layout: Layout,
) -> Result<(Self::Handle, usize), StorageAllocError>
fn allocate( &self, layout: Layout, ) -> Result<(Self::Handle, usize), StorageAllocError>
Allocates memory with a layout specified by
layout Read moreSource§unsafe fn deallocate(&self, layout: Layout, handle: Self::Handle)
unsafe fn deallocate(&self, layout: Layout, handle: Self::Handle)
impl Send for SlotStorage<'_>
Auto Trait Implementations§
impl<'a> Freeze for SlotStorage<'a>
impl<'a> !RefUnwindSafe for SlotStorage<'a>
impl<'a> !Sync for SlotStorage<'a>
impl<'a> Unpin for SlotStorage<'a>
impl<'a> !UnwindSafe for SlotStorage<'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