Skip to main content

IntoCollection

Trait IntoCollection 

Source
pub trait IntoCollection<T>: Sized {
    // Required method
    fn into_collection<A>(self) -> SmallVec<A>
       where A: Array<Item = T>;
}
Expand description

Trait implemented by types that can be converted into a collection.

Required Methods§

Source

fn into_collection<A>(self) -> SmallVec<A>
where A: Array<Item = T>,

Converts self into a collection.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T, const N: usize> IntoCollection<T> for [T; N]

Source§

fn into_collection<A>(self) -> SmallVec<A>
where A: Array<Item = T>,

Source§

impl<T> IntoCollection<T> for &[T]
where T: Clone,

Source§

fn into_collection<A>(self) -> SmallVec<A>
where A: Array<Item = T>,

Implementors§

Source§

impl<T> IntoCollection<T> for T

Source§

impl<T> IntoCollection<T> for Vec<T>