Struct Positions
#[must_use = "iterator adaptors are lazy and do nothing unless consumed"]
pub struct Positions<I, F> { /* private fields */ }
An iterator adapter to get the positions of each element that matches a predicate.
See .positions() for more information.
Trait Implementations
impl<I, F> Debug for Positions<I, F>
where
I: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl<I, F> DoubleEndedIterator for Positions<I, F>
where
I: DoubleEndedIterator + ExactSizeIterator,
F: FnMut(I::Item) -> bool,
fn next_back(&mut self) -> Option<Self::Item>fn rfold<B, G>(self, init: B, func: G) -> B where G: FnMut(B, Self::Item) -> B,
impl<I, F> FusedIterator for Positions<I, F>
where
I: FusedIterator,
F: FnMut(I::Item) -> bool,
impl<I, F> Iterator for Positions<I, F>
where
I: Iterator,
F: FnMut(I::Item) -> bool,
type Item = usize;fn next(&mut self) -> Option<Self::Item>fn size_hint(&self) -> (usize, Option<usize>)fn fold<B, G>(self, init: B, func: G) -> B where G: FnMut(B, Self::Item) -> B,
impl<I: Clone, F: Clone> Clone for Positions<I, F>
fn clone(&self) -> Self