VecStorage

Trait VecStorage 

Source
pub trait VecStorage<T>: VecSealedStorage<T> { }
Expand description

Trait defining how data for a container is stored.

There’s two implementations available:

This allows Vec to be generic over either sized or unsized storage. The vec module contains a VecInner struct that’s generic on VecStorage, and two type aliases for convenience:

Vec can be unsized into VecView, either by unsizing coercions such as &mut Vec -> &mut VecView or Box<Vec> -> Box<VecView>, or explicitly with .as_view() or .as_mut_view().

This trait is sealed, so you cannot implement it for your own types. You can only use the implementations provided by this crate.

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> VecStorage<T> for ViewVecStorage<T>

Source§

impl<T, const N: usize> VecStorage<T> for OwnedVecStorage<T, N>