pub trait Itertools: Iterator {
// Provided methods
fn collect_vec(self) -> Vec<Self::Item>
where Self: Sized { ... }
fn try_collect<T, U, E>(self) -> Result<U, E>
where Self: Sized + Iterator<Item = Result<T, E>>,
Result<U, E>: FromIterator<Result<T, E>> { ... }
fn try_collect_vec<T, U, E>(self) -> Result<Vec<U>, E>
where Self: Sized + Iterator<Item = Result<T, E>>,
Result<Vec<U>, E>: FromIterator<Result<T, E>> { ... }
fn enumerate_idx(self) -> EnumerateIdx<Self, IdxSize> ⓘ
where Self: Sized { ... }
fn enumerate_u32(self) -> EnumerateIdx<Self, u32> ⓘ
where Self: Sized { ... }
fn all_equal(self) -> bool
where Self: Sized,
Self::Item: PartialEq { ... }
fn eq_by_<I, F>(self, other: I, eq: F) -> bool
where Self: Sized,
I: IntoIterator,
F: FnMut(Self::Item, I::Item) -> bool { ... }
fn partial_cmp_by_<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>
where Self: Sized,
I: IntoIterator,
F: FnMut(Self::Item, I::Item) -> Option<Ordering> { ... }
}
Expand description
Utility extension trait of iterator methods.
Provided Methods§
Sourcefn collect_vec(self) -> Vec<Self::Item>where
Self: Sized,
fn collect_vec(self) -> Vec<Self::Item>where
Self: Sized,
Equivalent to .collect::<Vec<_>>()
.
Sourcefn try_collect<T, U, E>(self) -> Result<U, E>
fn try_collect<T, U, E>(self) -> Result<U, E>
Equivalent to .collect::<Result<_, _>>()
.
Sourcefn try_collect_vec<T, U, E>(self) -> Result<Vec<U>, E>
fn try_collect_vec<T, U, E>(self) -> Result<Vec<U>, E>
Equivalent to .collect::<Result<Vec<_>, _>>()
.