Struct MapWhile

1.57.0 · Source
pub struct MapWhile { /* private fields */ }
Expand description

An iterator that only accepts elements while predicate returns Some(_).

This struct is created by the map_while method on Iterator. See its documentation for more.

Trait Implementations§

1.57.0 · Source§

impl Clone for MapWhile
where I: Clone, P: Clone,

Source§

fn clone(&self) -> MapWhile

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
1.57.0 · Source§

impl Debug for MapWhile
where I: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
1.57.0 · Source§

impl Iterator for MapWhile
where I: Iterator, P: FnMut(Iterator>::Item) -> Option,

Source§

type Item = B

The type of the elements being iterated over.
Source§

fn next(&mut self) -> Option

Advances the iterator and returns the next value. Read more
Source§

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the iterator. Read more
Source§

fn try_fold(&mut self, init: Acc, fold: Fold) -> R
where MapWhile: Sized, Fold: FnMut(Acc, <MapWhile as Iterator>::Item) -> R, R: Try,

An iterator method that applies a function as long as it returns successfully, producing a single, final value. Read more
Source§

fn fold(self, init: AAA, fold: FFF) -> AAA
where FFF: FnMut(AAA, <MapWhile as Iterator>::Item) -> AAA,

Folds every element into an accumulator by applying an operation, returning the final result. Read more
Source§

fn next_chunkusize>( &mut self, ) -> Result<[Self::Item; N], IntoIterItem, N>>
where Self: Sized,

🔬This is a nightly-only experimental API. (iter_next_chunk #98326)
Advances the iterator and returns an array containing the next N values. Read more
1.0.0 · Source§

fn count(self) -> usize
where Self: Sized,

Consumes the iterator, counting the number of iterations and returning it. Read more
1.0.0 · Source§

fn last(self) -> OptionItem>
where Self: Sized,

Consumes the iterator, returning the last element. Read more
Source§

fn advance_by(&mut self, n: usize) -> Result<(), NonZero<usize>>

🔬This is a nightly-only experimental API. (iter_advance_by #77404)
Advances the iterator by n elements. Read more
1.0.0 · Source§

fn nth(&mut self, n: usize) -> OptionItem>

Returns the nth element of the iterator. Read more
1.28.0 · Source§

fn step_by(self, step: usize) -> StepBy
where Self: Sized,

Creates an iterator starting at the same point, but stepping by the given amount at each iteration. Read more
1.0.0 · Source§

fn chain(self, other: U) -> ChainIntoIterator>::IntoIter>
where Self: Sized, U: IntoIteratorItem>,

Takes two iterators and creates a new iterator over both in sequence. Read more
1.0.0 · Source§

fn zip(self, other: U) -> ZipIntoIterator>::IntoIter>
where Self: Sized, U: IntoIterator,

‘Zips up’ two iterators into a single iterator of pairs. Read more
Source§

fn intersperse(self, separator: Self::Item) -> Intersperse
where Self: Sized, Self::Item: Clone,

🔬This is a nightly-only experimental API. (iter_intersperse #79524)
Creates a new iterator which places a copy of separator between adjacent items of the original iterator. Read more
Source§

fn intersperse_with(self, separator: G) -> IntersperseWith
where Self: Sized, G: FnMut() -> Self::Item,

🔬This is a nightly-only experimental API. (iter_intersperse #79524)
Creates a new iterator which places an item generated by separator between adjacent items of the original iterator. Read more
1.0.0 · Source§

fn map(self, f: F) -> Map
where Self: Sized, F: FnMut(Self::Item) -> B,

Takes a closure and creates an iterator which calls that closure on each element. Read more
1.21.0 · Source§

fn for_each(self, f: F)
where Self: Sized, F: FnMut(Self::Item),

Calls a closure on each element of an iterator. Read more
1.0.0 · Source§

fn filter

(self, predicate: P) -> Filter

where Self: Sized, P: FnMut(&Self::Item) -> bool,

Creates an iterator which uses a closure to determine if an element should be yielded. Read more
1.0.0 · Source§

fn filter_map(self, f: F) -> FilterMap
where Self: Sized, F: FnMut(Self::Item) -> Option,

Creates an iterator that both filters and maps. Read more
1.0.0 · Source§

fn enumerate(self) -> Enumerate
where Self: Sized,

Creates an iterator which gives the current iteration count as well as the next value. Read more
1.0.0 · Source§

fn peekable(self) -> Peekable
where Self: Sized,

Creates an iterator which can use the peek and peek_mut methods to look at the next element of the iterator without consuming it. See their documentation for more information. Read more
1.0.0 · Source§

fn skip_while

(self, predicate: P) -> SkipWhile

where Self: Sized, P: FnMut(&Self::Item) -> bool,

Creates an iterator that skips elements based on a predicate. Read more
1.0.0 · Source§

fn take_while

(self, predicate: P) -> TakeWhile

where Self: Sized, P: FnMut(&Self::Item) -> bool,

Creates an iterator that yields elements based on a predicate. Read more
1.57.0 · Source§

fn map_while(self, predicate: P) -> MapWhile
where Self: Sized, P: FnMut(Self::Item) -> Option,

Creates an iterator that both yields elements based on a predicate and maps. Read more
1.0.0 · Source§

fn skip(self, n: usize) -> Skip
where Self: Sized,

Creates an iterator that skips the first n elements. Read more
1.0.0 · Source§

fn take(self, n: usize) -> Take
where Self: Sized,

Creates an iterator that yields the first n elements, or fewer if the underlying iterator ends sooner. Read more
1.0.0 · Source§

fn scan(self, initial_state: St, f: F) -> Scan
where Self: Sized, F: FnMut(&mut St, Self::Item) -> Option,

An iterator adapter which, like fold, holds internal state, but unlike fold, produces a new iterator. Read more
1.0.0 · Source§

fn flat_map(self, f: F) -> FlatMap
where Self: Sized, U: IntoIterator, F: FnMut(Self::Item) -> U,

Creates an iterator that works like map, but flattens nested structure. Read more
1.29.0 · Source§

fn flatten(self) -> Flatten
where Self: Sized, Self::Item: IntoIterator,

Creates an iterator that flattens nested structure. Read more
Source§

fn map_windowsusize>(self, f: F) -> MapWindows
where Self: Sized, F: FnMut(&[Self::Item; N]) -> R,

🔬This is a nightly-only experimental API. (iter_map_windows #87155)
Calls the given function f for each contiguous window of size N over self and returns an iterator over the outputs of f. Like slice::windows(), the windows during mapping overlap as well. Read more
1.0.0 · Source§

fn fuse(self) -> Fuse
where Self: Sized,

Creates an iterator which ends after the first None. Read more
1.0.0 · Source§

fn inspect(self, f: F) -> Inspect
where Self: Sized, F: FnMut(&Self::Item),

Does something with each element of an iterator, passing the value on. Read more
1.0.0 · Source§

fn by_ref(&mut self) -> &mut Self
where Self: Sized,

Creates a “by reference” adapter for this instance of Iterator. Read more
1.0.0 · Source§

fn collect(self) -> B
where B: FromIteratorItem>, Self: Sized,

Transforms an iterator into a collection. Read more
Source§

fn try_collect( &mut self, ) -> <Item as Try>::Residual as Residual>::TryType
where Self: Sized, Self::Item: Try, Item as Try>::Residual: Residual, B: FromIterator<Item as Try>::Output>,

🔬This is a nightly-only experimental API. (iterator_try_collect #94047)
Fallibly transforms an iterator into a collection, short circuiting if a failure is encountered. Read more
Source§

fn collect_into(self, collection: &mut E) -> &mut E
where E: ExtendItem>, Self: Sized,

🔬This is a nightly-only experimental API. (iter_collect_into #94780)
Collects all the items from an iterator into a collection. Read more
1.0.0 · Source§

fn partition(self, f: F) -> (B, B)
where Self: Sized, B: Default + ExtendItem>, F: FnMut(&Self::Item) -> bool,

Consumes an iterator, creating two collections from it. Read more
Source§

fn partition_in_place<'a, T, P>(self, predicate: P) -> usize
where T: 'a, Self: Sized + DoubleEndedIterator&'a mut T>, P: FnMut(&T) -> bool,

🔬This is a nightly-only experimental API. (iter_partition_in_place #62543)
Reorders the elements of this iterator in-place according to the given predicate, such that all those that return true precede all those that return false. Returns the number of true elements found. Read more
Source§

fn is_partitioned

(self, predicate: P) -> bool

where Self: Sized, P: FnMut(Self::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_is_partitioned #62544)
Checks if the elements of this iterator are partitioned according to the given predicate, such that all those that return true precede all those that return false. Read more
1.27.0 · Source§

fn try_for_each(&mut self, f: F) -> R
where Self: Sized, F: FnMut(Self::Item) -> R, R: Try()>,

An iterator method that applies a fallible function to each item in the iterator, stopping at the first error and returning that error. Read more
1.51.0 · Source§

fn reduce(self, f: F) -> OptionItem>
where Self: Sized, F: FnMut(Self::Item, Self::Item) -> Self::Item,

Reduces the elements to a single one, by repeatedly applying a reducing operation. Read more
Source§

fn try_reduce( &mut self, f: impl FnMut(Self::Item, Self::Item) -> R, ) -> <Try>::Residual as Residual<Option<Try>::Output>>>::TryType
where Self: Sized, R: TryItem>, Try>::Residual: Residual<OptionItem>>,

🔬This is a nightly-only experimental API. (iterator_try_reduce #87053)
Reduces the elements to a single one by repeatedly applying a reducing operation. If the closure returns a failure, the failure is propagated back to the caller immediately. Read more
1.0.0 · Source§

fn all(&mut self, f: F) -> bool
where Self: Sized, F: FnMut(Self::Item) -> bool,

Tests if every element of the iterator matches a predicate. Read more
1.0.0 · Source§

fn any(&mut self, f: F) -> bool
where Self: Sized, F: FnMut(Self::Item) -> bool,

Tests if any element of the iterator matches a predicate. Read more
1.0.0 · Source§

fn find

(&mut self, predicate: P) -> OptionItem>

where Self: Sized, P: FnMut(&Self::Item) -> bool,

Searches for an element of an iterator that satisfies a predicate. Read more
1.30.0 · Source§

fn find_map(&mut self, f: F) -> Option
where Self: Sized, F: FnMut(Self::Item) -> Option,

Applies function to the elements of iterator and returns the first non-none result. Read more
Source§

fn try_find( &mut self, f: impl FnMut(&Self::Item) -> R, ) -> <Try>::Residual as Residual<OptionItem>>>::TryType
where Self: Sized, R: Trybool>, Try>::Residual: Residual<OptionItem>>,

🔬This is a nightly-only experimental API. (try_find #63178)
Applies function to the elements of iterator and returns the first true result or the first error. Read more
1.0.0 · Source§

fn position

(&mut self, predicate: P) -> Option<usize>

where Self: Sized, P: FnMut(Self::Item) -> bool,

Searches for an element in an iterator, returning its index. Read more
1.0.0 · Source§

fn rposition

(&mut self, predicate: P) -> Option<usize>

where P: FnMut(Self::Item) -> bool, Self: Sized + ExactSizeIterator + DoubleEndedIterator,

Searches for an element in an iterator from the right, returning its index. Read more
1.0.0 · Source§

fn max(self) -> OptionItem>
where Self: Sized, Self::Item: Ord,

Returns the maximum element of an iterator. Read more
1.0.0 · Source§

fn min(self) -> OptionItem>
where Self: Sized, Self::Item: Ord,

Returns the minimum element of an iterator. Read more
1.6.0 · Source§

fn max_by_key(self, f: F) -> OptionItem>
where B: Ord, Self: Sized, F: FnMut(&Self::Item) -> B,

Returns the element that gives the maximum value from the specified function. Read more
1.15.0 · Source§

fn max_by(self, compare: F) -> OptionItem>
where Self: Sized, F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the maximum value with respect to the specified comparison function. Read more
1.6.0 · Source§

fn min_by_key(self, f: F) -> OptionItem>
where B: Ord, Self: Sized, F: FnMut(&Self::Item) -> B,

Returns the element that gives the minimum value from the specified function. Read more
1.15.0 · Source§

fn min_by(self, compare: F) -> OptionItem>
where Self: Sized, F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the minimum value with respect to the specified comparison function. Read more
1.0.0 · Source§

fn rev(self) -> Rev
where Self: Sized + DoubleEndedIterator,

Reverses an iterator’s direction. Read more
1.0.0 · Source§

fn unzip(self) -> (FromA, FromB)
where FromA: Default + Extend, FromB: Default + Extend, Self: Sized + Iterator(A, B)>,

Converts an iterator of pairs into a pair of containers. Read more
1.36.0 · Source§

fn copied<'a, T>(self) -> Copied
where T: 'a + Copy, Self: Sized + Iterator&'a T>,

Creates an iterator which copies all of its elements. Read more
1.0.0 · Source§

fn cloned<'a, T>(self) -> Cloned
where T: 'a + Clone, Self: Sized + Iterator&'a T>,

Creates an iterator which clones all of its elements. Read more
1.0.0 · Source§

fn cycle(self) -> Cycle
where Self: Sized + Clone,

Repeats an iterator endlessly. Read more
Source§

fn array_chunksusize>(self) -> ArrayChunks
where Self: Sized,

🔬This is a nightly-only experimental API. (iter_array_chunks #100450)
Returns an iterator over N elements of the iterator at a time. Read more
1.11.0 · Source§

fn sum(self) -> S
where Self: Sized, S: SumItem>,

Sums the elements of an iterator. Read more
1.11.0 · Source§

fn product

(self) -> P

where Self: Sized, P: ProductItem>,

Iterates over the entire iterator, multiplying all the elements Read more
1.5.0 · Source§

fn cmp(self, other: I) -> Ordering
where I: IntoIteratorItem>, Self::Item: Ord, Self: Sized,

Lexicographically compares the elements of this Iterator with those of another. Read more
Source§

fn cmp_by(self, other: I, cmp: F) -> Ordering
where Self: Sized, I: IntoIterator, F: FnMut(Self::Item, IntoIterator>::Item) -> Ordering,

🔬This is a nightly-only experimental API. (iter_order_by #64295)
Lexicographically compares the elements of this Iterator with those of another with respect to the specified comparison function. Read more
1.5.0 · Source§

fn partial_cmp(self, other: I) -> Option<Ordering>
where I: IntoIterator, Self::Item: PartialOrd<IntoIterator>::Item>, Self: Sized,

Lexicographically compares the PartialOrd elements of this Iterator with those of another. The comparison works like short-circuit evaluation, returning a result without comparing the remaining elements. As soon as an order can be determined, the evaluation stops and a result is returned. Read more
Source§

fn partial_cmp_by(self, other: I, partial_cmp: F) -> Option<Ordering>
where Self: Sized, I: IntoIterator, F: FnMut(Self::Item, IntoIterator>::Item) -> Option<Ordering>,

🔬This is a nightly-only experimental API. (iter_order_by #64295)
Lexicographically compares the elements of this Iterator with those of another with respect to the specified comparison function. Read more
1.5.0 · Source§

fn eq(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialEq<IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are equal to those of another. Read more
Source§

fn eq_by(self, other: I, eq: F) -> bool
where Self: Sized, I: IntoIterator, F: FnMut(Self::Item, IntoIterator>::Item) -> bool,

🔬This is a nightly-only experimental API. (iter_order_by #64295)
Determines if the elements of this Iterator are equal to those of another with respect to the specified equality function. Read more
1.5.0 · Source§

fn ne(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialEq<IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are not equal to those of another. Read more
1.5.0 · Source§

fn lt(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are lexicographically less than those of another. Read more
1.5.0 · Source§

fn le(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are lexicographically less or equal to those of another. Read more
1.5.0 · Source§

fn gt(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are lexicographically greater than those of another. Read more
1.5.0 · Source§

fn ge(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are lexicographically greater than or equal to those of another. Read more
1.82.0 · Source§

fn is_sorted(self) -> bool
where Self: Sized, Self::Item: PartialOrd,

Checks if the elements of this iterator are sorted. Read more
1.82.0 · Source§

fn is_sorted_by(self, compare: F) -> bool
where Self: Sized, F: FnMut(&Self::Item, &Self::Item) -> bool,

Checks if the elements of this iterator are sorted using the given comparator function. Read more
1.82.0 · Source§

fn is_sorted_by_key(self, f: F) -> bool
where Self: Sized, F: FnMut(Self::Item) -> K, K: PartialOrd,

Checks if the elements of this iterator are sorted using the given key extraction function. Read more

Auto Trait Implementations§

§

impl Freeze for MapWhile
where I: Freeze, P: Freeze,

§

impl RefUnwindSafe for MapWhile

§

impl Send for MapWhile
where I: Send, P: Send,

§

impl Sync for MapWhile
where I: Sync, P: Sync,

§

impl Unpin for MapWhile
where I: Unpin, P: Unpin,

§

impl UnwindSafe for MapWhile
where I: UnwindSafe, P: UnwindSafe,

Blanket Implementations§

Source§

impl Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl Borrow for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl BorrowMut for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit #126799)
Performs copy-assignment from self to dest. Read more
Source§

impl From for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl Into for T
where U: From,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From for U chooses to do.

Source§

impl IntoIterator for I
where I: Iterator,

Source§

type Item = Iterator>::Item

The type of the elements being iterated over.
Source§

type IntoIter = I

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> I

Creates an iterator from a value. Read more
Source§

impl ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl TryFrom for T
where U: Into,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> ResultTryFrom>::Error>

Performs the conversion.
Source§

impl TryInto for T
where U: TryFrom,

Source§

type Error = TryFrom>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> ResultTryFrom>::Error>

Performs the conversion.
type Item = [Iterator>::Item; N];
","Chain::IntoIter>":"

Notable traits for Chain

impl Iterator for Chain
where\n A: Iterator,\n B: IteratorIterator>::Item>,
type Item = Iterator>::Item;
","Cloned":"

Notable traits for Cloned

impl<'a, I, T> Iterator for Cloned
where\n T: 'a + Clone,\n I: Iterator&'a T>,
type Item = T;
","Copied":"

Notable traits for Copied

impl<'a, I, T> Iterator for Copied
where\n T: 'a + Copy,\n I: Iterator&'a T>,
type Item = T;
","Cycle":"

Notable traits for Cycle

impl Iterator for Cycle
where\n I: Clone + Iterator,
type Item = Iterator>::Item;
","Enumerate":"

Notable traits for Enumerate

impl Iterator for Enumerate
where\n I: Iterator,
type Item = (usize, Iterator>::Item);
","Filter":"

Notable traits for Filter

impl Iterator for Filter
where\n I: Iterator,\n P: FnMut(&Iterator>::Item) -> bool,
type Item = Iterator>::Item;
","FilterMap":"

Notable traits for FilterMap

impl Iterator for FilterMap
where\n I: Iterator,\n F: FnMut(Iterator>::Item) -> Option,
type Item = B;
","FlatMap":"

Notable traits for FlatMap

impl Iterator for FlatMap
where\n I: Iterator,\n U: IntoIterator,\n F: FnMut(Iterator>::Item) -> U,
type Item = IntoIterator>::Item;
","Flatten":"

Notable traits for Flatten

impl Iterator for Flatten
where\n I: Iterator,\n Iterator>::Item: IntoIteratorIterator>::Item>,\n U: Iterator,
type Item = Iterator>::Item;
","Fuse":"

Notable traits for Fuse

impl Iterator for Fuse
where\n I: Iterator,
type Item = Iterator>::Item;
","Inspect":"

Notable traits for Inspect

impl Iterator for Inspect
where\n I: Iterator,\n F: FnMut(&Iterator>::Item),
type Item = Iterator>::Item;
","Intersperse":"

Notable traits for Intersperse

impl Iterator for Intersperse
where\n I: Iterator,\n Iterator>::Item: Clone,
type Item = Iterator>::Item;
","IntersperseWith":"

Notable traits for IntersperseWith

impl Iterator for IntersperseWith
where\n I: Iterator,\n G: FnMut() -> Iterator>::Item,
type Item = Iterator>::Item;
","Map":"

Notable traits for Map

impl Iterator for Map
where\n I: Iterator,\n F: FnMut(Iterator>::Item) -> B,
type Item = B;
","MapWhile":"

Notable traits for MapWhile

impl Iterator for MapWhile
where\n I: Iterator,\n P: FnMut(Iterator>::Item) -> Option,
type Item = B;
","MapWhile":"

Notable traits for MapWhile

impl Iterator for MapWhile
where\n I: Iterator,\n P: FnMut(Iterator>::Item) -> Option,
type Item = B;
","MapWindows":"

Notable traits for MapWindows

implusize> Iterator for MapWindows
where\n I: Iterator,\n F: FnMut(&[Iterator>::Item; N]) -> R,
type Item = R;
","Peekable":"

Notable traits for Peekable

impl Iterator for Peekable
where\n I: Iterator,
type Item = Iterator>::Item;
","Rev":"

Notable traits for Rev

impl Iterator for Rev
type Item = Iterator>::Item;
","Scan":"

Notable traits for Scan

impl Iterator for Scan
where\n I: Iterator,\n F: FnMut(&mut St, Iterator>::Item) -> Option,
type Item = B;
","Skip":"

Notable traits for Skip

impl Iterator for Skip
where\n I: Iterator,
type Item = Iterator>::Item;
","SkipWhile":"

Notable traits for SkipWhile

impl Iterator for SkipWhile
where\n I: Iterator,\n P: FnMut(&Iterator>::Item) -> bool,
type Item = Iterator>::Item;
","StepBy":"

Notable traits for StepBy

impl Iterator for StepBy
where\n I: Iterator,
type Item = Iterator>::Item;
","Take":"

Notable traits for Take

impl Iterator for Take
where\n I: Iterator,
type Item = Iterator>::Item;
","TakeWhile":"

Notable traits for TakeWhile

impl Iterator for TakeWhile
where\n I: Iterator,\n P: FnMut(&Iterator>::Item) -> bool,
type Item = Iterator>::Item;
","Zip::IntoIter>":"

Notable traits for Zip

impl Iterator for Zip
where\n A: Iterator,\n B: Iterator,
type Item = (Iterator>::Item, Iterator>::Item);
"}