pub trait CollectableVec<I, T>: IterableVec<I, T>{
// Provided methods
fn iter_range(
&self,
from: Option<usize>,
to: Option<usize>,
) -> impl Iterator<Item = T> { ... }
fn iter_signed_range(
&self,
from: Option<i64>,
to: Option<i64>,
) -> impl Iterator<Item = T> { ... }
fn collect(&self) -> Vec<T> { ... }
fn collect_range(&self, from: Option<usize>, to: Option<usize>) -> Vec<T> { ... }
fn collect_signed_range(&self, from: Option<i64>, to: Option<i64>) -> Vec<T> { ... }
}Expand description
Trait for vectors that can be collected into standard Rust collections with range support.
Provided Methods§
Sourcefn iter_range(
&self,
from: Option<usize>,
to: Option<usize>,
) -> impl Iterator<Item = T>
fn iter_range( &self, from: Option<usize>, to: Option<usize>, ) -> impl Iterator<Item = T>
Returns an iterator over the specified range.
Sourcefn iter_signed_range(
&self,
from: Option<i64>,
to: Option<i64>,
) -> impl Iterator<Item = T>
fn iter_signed_range( &self, from: Option<i64>, to: Option<i64>, ) -> impl Iterator<Item = T>
Returns an iterator over the specified range using signed indices (supports negative indexing).
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.