Trait CollectVec

Source
pub trait CollectVec<T>: Sized + Iterator<Item = T> {
    // Provided methods
    fn collect_vec(self) -> Vec<T> { ... }
    fn collect_box(self) -> Box<[T]> { ... }
    fn collect_arr<const N: usize>(self) -> [T; N] { ... }
}

Provided Methods§

Source

fn collect_vec(self) -> Vec<T>

Source

fn collect_box(self) -> Box<[T]>

Source

fn collect_arr<const N: usize>(self) -> [T; N]

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<V: Sized + Iterator<Item = T>, T> CollectVec<T> for V