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

Auto Trait Implementations

impl<I, F> Freeze for Positions<I, F> where Enumerate<I>: Freeze, F: Freeze,

impl<I, F> RefUnwindSafe for Positions<I, F> where Enumerate<I>: RefUnwindSafe, F: RefUnwindSafe,

impl<I, F> Send for Positions<I, F> where Enumerate<I>: Send, F: Send,

impl<I, F> Sync for Positions<I, F> where Enumerate<I>: Sync, F: Sync,

impl<I, F> Unpin for Positions<I, F> where Enumerate<I>: Unpin, F: Unpin,

impl<I, F> UnsafeUnpin for Positions<I, F> where Enumerate<I>: UnsafeUnpin, F: UnsafeUnpin,

impl<I, F> UnwindSafe for Positions<I, F> where Enumerate<I>: UnwindSafe, F: UnwindSafe,

Blanket Implementations

impl<I> IntoIterator for Positions<I, F> where I: Iterator,

impl<T> Any for Positions<I, F> where T: 'static + ?Sized,

impl<T> Borrow<T> for Positions<I, F> where T: ?Sized,

impl<T> BorrowMut<T> for Positions<I, F> where T: ?Sized,

impl<T> CloneToUninit for Positions<I, F> where T: Clone,

impl<T> From<T> for Positions<I, F>

impl<T> IntoEither for Positions<I, F>

impl<T> Itertools for Positions<I, F> where T: Iterator + ?Sized,

impl<T> ToOwned for Positions<I, F> where T: Clone,

impl<T, U> Into<U> for Positions<I, F> where U: From<T>,

impl<T, U> TryFrom<U> for Positions<I, F> where U: Into<T>,

impl<T, U> TryInto<U> for Positions<I, F> where U: TryFrom<T>,