pub trait DoubleEndedLender: Lender {
// Required method
fn next_back(&mut self) -> Option<Lend<'_, Self>>;
// Provided methods
fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize> { ... }
fn nth_back(&mut self, n: usize) -> Option<Lend<'_, Self>> { ... }
fn try_rfold<B, F, R>(&mut self, init: B, f: F) -> R
where F: FnMut(B, Lend<'_, Self>) -> R,
R: Try<Output = B> { ... }
fn rfold<B, F>(self, init: B, f: F) -> B
where Self: Sized,
F: FnMut(B, Lend<'_, Self>) -> B { ... }
fn rfind<P>(&mut self, predicate: P) -> Option<Lend<'_, Self>>
where Self: Sized,
P: FnMut(&Lend<'_, Self>) -> bool { ... }
}Expand description
The Lender version of core::iter::DoubleEndedIterator.
Required Methods§
Provided Methods§
Sourcefn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize>
fn advance_back_by(&mut self, n: usize) -> Result<(), NonZeroUsize>
Advances the lender from the back by n elements.
Sourcefn nth_back(&mut self, n: usize) -> Option<Lend<'_, Self>>
fn nth_back(&mut self, n: usize) -> Option<Lend<'_, Self>>
Returns the nth element from the end of the lender.
Sourcefn try_rfold<B, F, R>(&mut self, init: B, f: F) -> R
fn try_rfold<B, F, R>(&mut self, init: B, f: F) -> R
The reverse version of Lender::try_fold: it takes elements starting from
the back of the lender.
Sourcefn rfold<B, F>(self, init: B, f: F) -> B
fn rfold<B, F>(self, init: B, f: F) -> B
The reverse version of Lender::fold: it takes elements starting from
the back of the lender.
Sourcefn rfind<P>(&mut self, predicate: P) -> Option<Lend<'_, Self>>
fn rfind<P>(&mut self, predicate: P) -> Option<Lend<'_, Self>>
The reverse version of Lender::find: it searches for an element of the
lender from the back that satisfies the predicate.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.