Struct IntersperseWith
#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
pub struct IntersperseWith<I, ElemF>
where
I: Iterator, { /* private fields */ }
An iterator adaptor to insert a particular value created by a function between each element of the adapted iterator.
Iterator element type is I::Item
This iterator is fused.
See .intersperse_with() for more information.
Trait Implementations
impl<I, ElemF> FusedIterator for IntersperseWith<I, ElemF>
where
I: Iterator,
ElemF: IntersperseElement<I::Item>,
impl<I, ElemF> Iterator for IntersperseWith<I, ElemF>
where
I: Iterator,
ElemF: IntersperseElement<I::Item>,
type Item = <I as Iterator>::Item;fn next(&mut self) -> Option<Self::Item>fn size_hint(&self) -> (usize, Option<usize>)fn fold<B, F>(self, init: B, f: F) -> B where Self: Sized, F: FnMut(B, Self::Item) -> B,
impl<I, ElemF: Clone> Clone for IntersperseWith<I, ElemF>
where
I: Iterator + Clone,
I::Item: Clone,
fn clone(&self) -> Self
impl<I, ElemF: Debug> Debug for IntersperseWith<I, ElemF>
where
I: Iterator + Debug,
I::Item: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Result