pub trait VecConfigNew<T>: VecConfigSpawn<T> {
const EMPTY_BUFFER: Self::Buffer<T>;
// Required method
fn buffer_try_new(
capacity: Self::Index,
exact: bool,
) -> Result<Self::Buffer<T>, StorageError>;
}
Expand description
Support creation of new Vec
instances without a storage reference.
Required Associated Constants§
Sourceconst EMPTY_BUFFER: Self::Buffer<T>
const EMPTY_BUFFER: Self::Buffer<T>
Constant initializer for an empty buffer.
Required Methods§
Sourcefn buffer_try_new(
capacity: Self::Index,
exact: bool,
) -> Result<Self::Buffer<T>, StorageError>
fn buffer_try_new( 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.