Trait VecConfigSpawn

Source
pub trait VecConfigSpawn<T>: VecConfig {
    // Required method
    fn buffer_try_spawn(
        buf: &Self::Buffer<T>,
        capacity: Self::Index,
        exact: bool,
    ) -> Result<Self::Buffer<T>, StorageError>;
}
Expand description

Support creation of new Vec buffer instances from an existing instance.

Required Methods§

Source

fn buffer_try_spawn( buf: &Self::Buffer<T>, capacity: Self::Index, exact: bool, ) -> Result<Self::Buffer<T>, StorageError>

Try to create a new buffer instance with a given capacity.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T, A: Allocator + Clone> VecConfigSpawn<T> for A

Source§

impl<T, A: Allocator + Clone, I: Index, G: Grow> VecConfigSpawn<T> for Custom<A, I, G>

Source§

impl<T, A: Allocator + Clone, I: Index, G: Grow> VecConfigSpawn<T> for Thin<A, I, G>

Source§

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