pub trait Iterator {
    type Item;

Show 41 methods // Required methods fn next(&mut self) -> Option<Self::Item>; fn size_hint(&self) -> (usize, Option<usize>); fn count(self) -> usize where Self: Sized; fn last(self) -> Option<Self::Item> where Self: Sized; fn advance_by(&mut self, n: usize) -> Result<(), usize>; fn nth(&mut self, n: usize) -> Option<Self::Item>; fn step_by(self, step: usize) -> StepBy<Self> where Self: Sized; fn chain<U>(self, other: U) -> Chain<Self, U::IntoIter> where Self: Sized, U: IntoIterator<Item = Self::Item>; fn zip<U>(self, other: U) -> Zip<Self, U::IntoIter> where Self: Sized, U: IntoIterator; fn intersperse(self, separator: Self::Item) -> Intersperse<Self> where Self: Sized, Self::Item: Clone; fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G> where Self: Sized, G: FnMut() -> Self::Item; fn map<B, F>(self, f: F) -> Map<Self, F> where Self: Sized, F: FnMut(Self::Item) -> B; fn for_each<F>(self, f: F) where Self: Sized, F: FnMut(Self::Item); fn filter<P>(self, predicate: P) -> Filter<Self, P> where Self: Sized, P: FnMut(&Self::Item) -> bool; fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F> where Self: Sized, F: FnMut(Self::Item) -> Option<B>; fn enumerate(self) -> Enumerate<Self> where Self: Sized; fn peekable(self) -> Peekable<Self> where Self: Sized; fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P> where Self: Sized, P: FnMut(&Self::Item) -> bool; fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P> where Self: Sized, P: FnMut(&Self::Item) -> bool; fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P> where Self: Sized, P: FnMut(Self::Item) -> Option<B>; fn skip(self, n: usize) -> Skip<Self> where Self: Sized; fn take(self, n: usize) -> Take<Self> where Self: Sized; fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F> where Self: Sized, F: FnMut(&mut St, Self::Item) -> Option<B>; fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F> where Self: Sized, U: IntoIterator, F: FnMut(Self::Item) -> U; fn flatten(self) -> Flatten<Self> where Self: Sized, Self::Item: IntoIterator; fn fuse(self) -> Fuse<Self> where Self: Sized; fn inspect<F>(self, f: F) -> Inspect<Self, F> where Self: Sized, F: FnMut(&Self::Item); fn by_ref(&mut self) -> &mut Self where Self: Sized; fn collect<B: FromIterator<Self::Item>>(self) -> B where Self: Sized; fn collect_into<E: Extend<Self::Item>>(self, collection: &mut E) -> &mut E where Self: Sized; fn partition<B, F>(self, f: F) -> (B, B) where Self: Sized, B: Default + Extend<Self::Item>, F: FnMut(&Self::Item) -> bool; fn partition_in_place<'a, T: 'a, P>(self, predicate: P) -> usize where Self: Sized + DoubleEndedIterator<Item = &'a mut T>, P: FnMut(&T) -> bool; fn is_partitioned<P>(self, predicate: P) -> bool where Self: Sized, P: FnMut(Self::Item) -> bool; fn fold<B, F>(self, init: B, f: F) -> B where Self: Sized, F: FnMut(B, Self::Item) -> B; fn reduce<F>(self, f: F) -> Option<Self::Item> where Self: Sized, F: FnMut(Self::Item, Self::Item) -> Self::Item; fn all<F>(&mut self, f: F) -> bool where Self: Sized, F: FnMut(Self::Item) -> bool; fn any<F>(&mut self, f: F) -> bool where Self: Sized, F: FnMut(Self::Item) -> bool; fn find<P>(&mut self, predicate: P) -> Option<Self::Item> where Self: Sized, P: FnMut(&Self::Item) -> bool; fn find_map<B, F>(&mut self, f: F) -> Option<B> where Self: Sized, F: FnMut(Self::Item) -> Option<B>; fn position<P>(&mut self, predicate: P) -> Option<usize> where Self: Sized, P: FnMut(Self::Item) -> bool; fn this_is_a_method_with_a_long_name_returning_something() -> String;
}
Expand description

Shamelessly (partially) copied from std::iter::Iterator. It allows us to check that the scroll is working as expected on “hidden” items.

Required Associated Types§

Required Methods§

source

fn next(&mut self) -> Option<Self::Item>

source

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

source

fn count(self) -> usizewhere Self: Sized,

source

fn last(self) -> Option<Self::Item>where Self: Sized,

source

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

source

fn nth(&mut self, n: usize) -> Option<Self::Item>

source

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

source

fn chain<U>(self, other: U) -> Chain<Self, U::IntoIter>where Self: Sized, U: IntoIterator<Item = Self::Item>,

source

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

source

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

source

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

source

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

source

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

source

fn filter<P>(self, predicate: P) -> Filter<Self, P>where Self: Sized, P: FnMut(&Self::Item) -> bool,

source

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

source

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

source

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

source

fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>where Self: Sized, P: FnMut(&Self::Item) -> bool,

source

fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>where Self: Sized, P: FnMut(&Self::Item) -> bool,

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

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

source

fn collect<B: FromIterator<Self::Item>>(self) -> Bwhere Self: Sized,

source

fn collect_into<E: Extend<Self::Item>>(self, collection: &mut E) -> &mut Ewhere Self: Sized,

source

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

source

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

source

fn is_partitioned<P>(self, predicate: P) -> boolwhere Self: Sized, P: FnMut(Self::Item) -> bool,

source

fn fold<B, F>(self, init: B, f: F) -> Bwhere Self: Sized, F: FnMut(B, Self::Item) -> B,

source

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

source

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

source

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

source

fn find<P>(&mut self, predicate: P) -> Option<Self::Item>where Self: Sized, P: FnMut(&Self::Item) -> bool,

source

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

source

fn position<P>(&mut self, predicate: P) -> Option<usize>where Self: Sized, P: FnMut(Self::Item) -> bool,

source

fn this_is_a_method_with_a_long_name_returning_something() -> String

We will scroll to “string” to ensure it scrolls as expected.

Implementors§