Struct Rev
struct Rev<T> { ... }
A double-ended iterator with the direction inverted.
This struct is created by the rev method on Iterator. See its
documentation for more.
Implementations
impl<T> Rev<T>
fn into_inner(self: Self) -> TConsumes the
Rev, returning the inner iterator.Examples
let s = "foobar"; let mut rev = s.chars.rev; assert_eq!; assert_eq!; assert_eq!; assert_eq!;
impl<I> DoubleEndedIterator for Rev<I>
fn next_back(self: &mut Self) -> Option<<I as Iterator>::Item>fn advance_back_by(self: &mut Self, n: usize) -> Result<(), NonZero<usize>>fn nth_back(self: &mut Self, n: usize) -> Option<<I as Iterator>::Item>fn try_rfold<B, F, R>(self: &mut Self, init: B, f: F) -> R where Self: Sized, F: FnMut(B, <Self as >::Item) -> R, R: Try<Output = B>fn rfold<Acc, F>(self: Self, init: Acc, f: F) -> Acc where F: FnMut(Acc, <Self as >::Item) -> Accfn rfind<P>(self: &mut Self, predicate: P) -> Option<<Self as >::Item> where P: FnMut(&<Self as >::Item) -> bool
impl<I> ExactSizeIterator for Rev<I>
fn len(self: &Self) -> usizefn is_empty(self: &Self) -> bool
impl<I> FusedIterator for Rev<I>
impl<I> IntoIterator for Rev<T>
fn into_iter(self: Self) -> I
impl<I> Iterator for Rev<I>
fn next(self: &mut Self) -> Option<<I as Iterator>::Item>fn size_hint(self: &Self) -> (usize, Option<usize>)fn advance_by(self: &mut Self, n: usize) -> Result<(), NonZero<usize>>fn nth(self: &mut Self, n: usize) -> Option<<I as Iterator>::Item>fn try_fold<B, F, R>(self: &mut Self, init: B, f: F) -> R where Self: Sized, F: FnMut(B, <Self as >::Item) -> R, R: Try<Output = B>fn fold<Acc, F>(self: Self, init: Acc, f: F) -> Acc where F: FnMut(Acc, <Self as >::Item) -> Accfn find<P>(self: &mut Self, predicate: P) -> Option<<Self as >::Item> where P: FnMut(&<Self as >::Item) -> bool
impl<I> TrustedLen for Rev<I>
impl<I: Default> Default for Rev<I>
fn default() -> SelfCreates a
Reviterator from the default value ofI# use slice; # use Rev; let iter: = Defaultdefault; assert_eq!;
impl<T> Any for Rev<T>
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Rev<T>
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Rev<T>
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for Rev<T>
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> Freeze for Rev<T>
impl<T> From for Rev<T>
fn from(t: T) -> TReturns the argument unchanged.
impl<T> RefUnwindSafe for Rev<T>
impl<T> Send for Rev<T>
impl<T> Sync for Rev<T>
impl<T> Unpin for Rev<T>
impl<T> UnsafeUnpin for Rev<T>
impl<T> UnwindSafe for Rev<T>
impl<T, U> Into for Rev<T>
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Rev<T>
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Rev<T>
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>
impl<T: $crate::clone::Clone> Clone for Rev<T>
fn clone(self: &Self) -> Rev<T>
impl<T: $crate::fmt::Debug> Debug for Rev<T>
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result