Trait VecNewIn

Source
pub trait VecNewIn<T> {
    type Config: VecConfig;

    // Required method
    fn buffer_try_new_in(
        self,
        capacity: <Self::Config as VecConfig>::Index,
        exact: bool,
    ) -> Result<<Self::Config as VecConfig>::Buffer<T>, StorageError>;
}
Expand description

Support creation of a new Vec instance within an allocation target.

Required Associated Types§

Source

type Config: VecConfig

The associated Vec configuration type.

Required Methods§

Source

fn buffer_try_new_in( self, capacity: <Self::Config as VecConfig>::Index, exact: bool, ) -> Result<<Self::Config as VecConfig>::Buffer<T>, StorageError>

Try to create a new buffer given an allocation target.

Implementors§

Source§

impl<'a, T, A: Allocator> VecNewIn<T> for SpillStorage<'a, &'a mut [MaybeUninit<T>], A>

Source§

type Config = Spill<'a, A>

Source§

impl<'a, T, const N: usize> VecNewIn<T> for &'a mut ArrayStorage<T, N>

Source§

impl<T, A: Allocator, I: Index, G: Grow> VecNewIn<T> for Custom<A, I, G>

Source§

type Config = Custom<A, I, G>

Source§

impl<T, A: AllocatorDefault, I: Index, G: Grow> VecNewIn<T> for Thin<A, I, G>

Source§

type Config = Thin<A, I, G>

Source§

impl<T, C: AllocateIn> VecNewIn<T> for C

Source§

impl<T, const N: usize> VecNewIn<T> for Inline<N>