Struct gat_lending_iterator::LendRefsMut
source · pub struct LendRefsMut<I: Iterator> { /* private fields */ }
Expand description
A lending iterator that given an iterator, lends mutable references to the given iterator’s items.
Trait Implementations§
source§impl<I: Clone + Iterator> Clone for LendRefsMut<I>
impl<I: Clone + Iterator> Clone for LendRefsMut<I>
source§fn clone(&self) -> LendRefsMut<I>
fn clone(&self) -> LendRefsMut<I>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<I: Iterator> LendingIterator for LendRefsMut<I>
impl<I: Iterator> LendingIterator for LendRefsMut<I>
source§type Item<'a> = &'a mut <I as Iterator>::Item
where
Self: 'a
type Item<'a> = &'a mut <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
n
th 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 take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P>
Creates a lending iterator that lends items matching a predicate. Read more
source§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
source§fn fold<B, F>(self, init: B, f: F) -> B
fn fold<B, F>(self, init: B, f: F) -> B
Folds every element into an accumulator by applying an operation,
returning the final result. Read more
source§fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
fn enumerate(self) -> Enumerate<Self>where
Self: Sized,
Creates a lending iterator which gives the current iteration count as well as the next value.
source§fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
fn skip(self, n: usize) -> Skip<Self>where
Self: Sized,
Creates a lending iterator that skips over the first
n
elements of self.source§fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P>
Creates a lending iterator that rejects elements while
predicate
returns true
.source§fn all<P>(&mut self, predicate: P) -> bool
fn all<P>(&mut self, predicate: P) -> bool
Tests if every element of the iterator matches a predicate.
source§fn any<P>(&mut self, predicate: P) -> bool
fn any<P>(&mut self, predicate: P) -> bool
Tests if any element of the iterator matches a predicate.
source§fn is_partitioned<P>(self, predicate: P) -> bool
fn is_partitioned<P>(self, predicate: P) -> bool
Checks if the elements of this iterator are partitioned according to the given predicate,
such that all those that return
true
precede all those that return false
.source§fn find<P>(&mut self, predicate: P) -> Option<Self::Item<'_>>
fn find<P>(&mut self, predicate: P) -> Option<Self::Item<'_>>
Searches for an element of an iterator that satisfies a predicate.
source§fn find_map<B, F>(&mut self, f: F) -> Option<B>
fn find_map<B, F>(&mut self, f: F) -> Option<B>
Applies function to the elements of iterator and returns
the first non-none result.
source§fn position<P>(&mut self, predicate: P) -> Option<usize>
fn position<P>(&mut self, predicate: P) -> Option<usize>
Searches for an element in an iterator, returning its index.
source§fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
Lexicographically compares the elements of this
Iterator
with those
of another with respect to the specified comparison function.source§fn partial_cmp<I>(self, other: I) -> Option<Ordering>
fn partial_cmp<I>(self, other: I) -> Option<Ordering>
Lexicographically compares the
PartialOrd
elements of
this Iterator
with those of another. The comparison works like short-circuit
evaluation, returning a result without comparing the remaining elements.
As soon as an order can be determined, the evaluation stops and a result is returned.source§fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>
fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>
Lexicographically compares the elements of this
Iterator
with those
of another with respect to the specified comparison function.source§fn eq<I>(self, other: I) -> bool
fn eq<I>(self, other: I) -> bool
Determines if the elements of this
Iterator
are equal to those of
another.source§fn eq_by<I, F>(self, other: I, eq: F) -> bool
fn eq_by<I, F>(self, other: I, eq: F) -> bool
Determines if the elements of this
Iterator
are equal to those of
another with respect to the specified equality function.source§fn ne<I>(self, other: I) -> bool
fn ne<I>(self, other: I) -> bool
Determines if the elements of this
Iterator
are not equal to those of
another.source§fn lt<I>(self, other: I) -> bool
fn lt<I>(self, other: I) -> bool
Determines if the elements of this
Iterator
are lexicographically
less than those of another.source§fn le<I>(self, other: I) -> bool
fn le<I>(self, other: I) -> bool
Determines if the elements of this
Iterator
are lexicographically
less or equal to those of another.source§fn gt<I>(self, other: I) -> bool
fn gt<I>(self, other: I) -> bool
Determines if the elements of this
Iterator
are lexicographically
greater than those of another.Auto Trait Implementations§
impl<I> Freeze for LendRefsMut<I>
impl<I> RefUnwindSafe for LendRefsMut<I>
impl<I> Send for LendRefsMut<I>
impl<I> Sync for LendRefsMut<I>
impl<I> Unpin for LendRefsMut<I>
impl<I> UnwindSafe for LendRefsMut<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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)