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§
fn collect_vec(self) -> Vec<T>
fn collect_box(self) -> Box<[T]>
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.