pub struct SpillStorage<'a, I: 'a, A> { /* private fields */ }
Expand description
An allocator which consumes the provided fixed storage before deferring to the
contained A
instance allocator for further allocations
Trait Implementations§
Source§impl<'a, I, A> AllocateIn for SpillStorage<'a, I, A>
impl<'a, I, A> AllocateIn for SpillStorage<'a, I, A>
Source§fn allocate_in(
self,
layout: Layout,
) -> Result<(NonNull<[u8]>, Self::Alloc), AllocError>
fn allocate_in( self, layout: Layout, ) -> Result<(NonNull<[u8]>, Self::Alloc), AllocError>
Try to allocate a slice of a memory corresponding to
layout
, returning
the new allocation and the allocator instanceSource§fn allocate_zeroed_in(
self,
layout: Layout,
) -> Result<(NonNull<[u8]>, Self::Alloc), AllocError>
fn allocate_zeroed_in( self, layout: Layout, ) -> Result<(NonNull<[u8]>, Self::Alloc), AllocError>
Try to allocate a slice of a memory corresponding to
layout
, returning
the new allocation and the allocator instance. The memory will be initialized
with zeroes.Source§impl<'a, I: Clone + 'a, A: Clone> Clone for SpillStorage<'a, I, A>
impl<'a, I: Clone + 'a, A: Clone> Clone for SpillStorage<'a, I, A>
Source§fn clone(&self) -> SpillStorage<'a, I, A>
fn clone(&self) -> SpillStorage<'a, I, A>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<'a, I: Default + 'a, A: Default> Default for SpillStorage<'a, I, A>
impl<'a, I: Default + 'a, A: Default> Default for SpillStorage<'a, I, A>
Source§fn default() -> SpillStorage<'a, I, A>
fn default() -> SpillStorage<'a, I, A>
Returns the “default value” for a type. Read more
Source§impl<'a, T, A: Allocator> VecNewIn<T> for SpillStorage<'a, &'a mut [MaybeUninit<T>], A>
impl<'a, T, A: Allocator> VecNewIn<T> for SpillStorage<'a, &'a mut [MaybeUninit<T>], A>
Auto Trait Implementations§
impl<'a, I, A> Freeze for SpillStorage<'a, I, A>
impl<'a, I, A> RefUnwindSafe for SpillStorage<'a, I, A>where
I: RefUnwindSafe,
A: RefUnwindSafe,
impl<'a, I, A> Send for SpillStorage<'a, I, A>
impl<'a, I, A> Sync for SpillStorage<'a, I, A>
impl<'a, I, A> Unpin for SpillStorage<'a, I, A>
impl<'a, I, A> !UnwindSafe for SpillStorage<'a, I, 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<T, A> ToOwnedIn<A> for T
impl<T, A> ToOwnedIn<A> for T
Source§fn try_to_owned_in<I>(
&self,
_alloc_in: I,
) -> Result<<T as ToOwnedIn<A>>::Owned, StorageError>where
I: AllocateIn<Alloc = A>,
fn try_to_owned_in<I>(
&self,
_alloc_in: I,
) -> Result<<T as ToOwnedIn<A>>::Owned, StorageError>where
I: AllocateIn<Alloc = A>,
To to create an owned copy of this instance in a given allocation target.
Source§fn to_owned_in<I>(&self, alloc_in: I) -> Self::Ownedwhere
I: AllocateIn<Alloc = A>,
fn to_owned_in<I>(&self, alloc_in: I) -> Self::Ownedwhere
I: AllocateIn<Alloc = A>,
Create an owned copy of this instance in a given allocation target.
Source§impl<T, C> VecNewIn<T> for Cwhere
C: AllocateIn,
impl<T, C> VecNewIn<T> for Cwhere
C: AllocateIn,
Source§type Config = <C as AllocateIn>::Alloc
type Config = <C as AllocateIn>::Alloc
The associated
Vec
configuration type.