Struct gat_lending_iterator::Windows
source · pub struct Windows<I: Iterator> { /* private fields */ }Expand description
A lending iterator over windows.
This struct is created by the windows method on ToLendingIterator. See
its documentation for more.
Trait Implementations§
source§impl<I: Iterator> LendingIterator for Windows<I>
impl<I: Iterator> LendingIterator for Windows<I>
§type Item<'a> = &'a [<I as Iterator>::Item]
where
Self: 'a
type Item<'a> = &'a [<I as Iterator>::Item] where Self: 'a
The type of the elements being iterated over.
source§fn next(&mut self) -> Option<Self::Item<'_>>
fn next(&mut self) -> Option<Self::Item<'_>>
Advances the lending iterator and returns the next value. Read more
source§fn size_hint(&self) -> (usize, Option<usize>)
fn size_hint(&self) -> (usize, Option<usize>)
Returns the bounds on the remaining length of the iterator. Read more
source§fn count(self) -> usizewhere
Self: Sized,
fn count(self) -> usizewhere
Self: Sized,
Returns the number of items in the lending iterator. Read more
source§fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize>
fn advance_by(&mut self, n: usize) -> Result<(), NonZeroUsize>
Advances the lending iterator by
n elements. Read moresource§fn nth(&mut self, n: usize) -> Option<Self::Item<'_>>
fn nth(&mut self, n: usize) -> Option<Self::Item<'_>>
Returns the
nth element of the lending iterator. Read moresource§fn step_by(self, step: usize) -> StepBy<Self>where
Self: Sized,
fn step_by(self, step: usize) -> StepBy<Self>where
Self: Sized,
Creates a lending iterator starting at the same point, but stepping by
the given amount at each iteration. Read more
source§fn take(self, n: usize) -> Take<Self>where
Self: Sized,
fn take(self, n: usize) -> Take<Self>where
Self: Sized,
Creates a lending iterator that lends the first
n elements, or fewer
if the underlying iterator ends sooner. Read moresource§fn chain<I>(self, other: I) -> Chain<Self, I>
fn chain<I>(self, other: I) -> Chain<Self, I>
Takes two lending iterators and creates a new lending iterator over both in sequence. Read more
source§fn zip<I>(self, other: I) -> Zip<Self, I>where
Self: Sized,
I: LendingIterator,
fn zip<I>(self, other: I) -> Zip<Self, I>where
Self: Sized,
I: LendingIterator,
‘Zips up’ two lending iterators into a single lending iterator of pairs.
source§fn map<F>(self, f: F) -> Map<Self, F>
fn map<F>(self, f: F) -> Map<Self, F>
Takes a closure and creates a lending iterator which calls that closure on each
element. Read more
source§fn filter<P>(self, predicate: P) -> Filter<Self, P>
fn filter<P>(self, predicate: P) -> Filter<Self, P>
Creates a lending iterator which uses a closure to determine if an element
should be yielded. Read more
source§fn filter_map<F>(self, f: F) -> FilterMap<Self, F>where
Self: Sized,
F: for<'a> SingleArgFnMut<Self::Item<'a>>,
for<'a> <F as SingleArgFnOnce<Self::Item<'a>>>::Output: OptionTrait,
fn filter_map<F>(self, f: F) -> FilterMap<Self, F>where
Self: Sized,
F: for<'a> SingleArgFnMut<Self::Item<'a>>,
for<'a> <F as SingleArgFnOnce<Self::Item<'a>>>::Output: OptionTrait,
Creates a lending iterator that both filters and maps. Read more
Auto Trait Implementations§
impl<I> RefUnwindSafe for Windows<I>
impl<I> Send for Windows<I>
impl<I> Sync for Windows<I>
impl<I> Unpin for Windows<I>
impl<I> UnwindSafe for Windows<I>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more