Trait split_iter::Splittable
[−]
[src]
pub trait Splittable<I> where
I: Iterator, { fn split<P>(self, predicate: P) -> (Split<I, P>, Split<I, P>)
where
P: FnMut(&I::Item) -> bool; }
Provides an iterator adaptor method that splits an iterator into two iterators according to a predicate.
Required Methods
fn split<P>(self, predicate: P) -> (Split<I, P>, Split<I, P>) where
P: FnMut(&I::Item) -> bool,
P: FnMut(&I::Item) -> bool,
Splits the iterator. The left iterator iterates over all items for which
the predicate
returns false
. The right iterator returns all items
for which the predicate
returns true
.
Implementors
impl<I> Splittable<I> for I where
I: Iterator,