Skip to main content

DoubleEndedIterator

Trait DoubleEndedIterator 

1.0.0 (const: unstable) · Source
pub trait DoubleEndedIterator: Iterator {
    // Required method
    fn next_back(&mut self) -> Option<Self::Item>;

    // Provided methods
    fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero<usize>> { ... }
    fn nth_back(&mut self, n: usize) -> Option<Self::Item> { ... }
    fn try_rfold<B, F, R>(&mut self, init: B, f: F) -> R
       where Self: Sized,
             F: FnMut(B, Self::Item) -> R,
             R: Try<Output = B> { ... }
    fn rfold<B, F>(self, init: B, f: F) -> B
       where Self: Sized,
             F: FnMut(B, Self::Item) -> B { ... }
    fn rfind<P>(&mut self, predicate: P) -> Option<Self::Item>
       where Self: Sized,
             P: FnMut(&Self::Item) -> bool { ... }
}
Expand description

An iterator able to yield elements from both ends.

Something that implements DoubleEndedIterator has one extra capability over something that implements Iterator: the ability to also take Items from the back, as well as the front.

It is important to note that both back and forth work on the same range, and do not cross: iteration is over when they meet in the middle.

In a similar fashion to the Iterator protocol, once a DoubleEndedIterator returns None from a next_back(), calling it again may or may not ever return Some again. next() and next_back() are interchangeable for this purpose.

§Examples

Basic usage:

let numbers = vec![1, 2, 3, 4, 5, 6];

let mut iter = numbers.iter();

assert_eq!(Some(&1), iter.next());
assert_eq!(Some(&6), iter.next_back());
assert_eq!(Some(&5), iter.next_back());
assert_eq!(Some(&2), iter.next());
assert_eq!(Some(&3), iter.next());
assert_eq!(Some(&4), iter.next());
assert_eq!(None, iter.next());
assert_eq!(None, iter.next_back());

Required Methods§

1.0.0 (const: unstable) · Source

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

Removes and returns an element from the end of the iterator.

Returns None when there are no more elements.

The trait-level docs contain more details.

§Examples

Basic usage:

let numbers = vec![1, 2, 3, 4, 5, 6];

let mut iter = numbers.iter();

assert_eq!(Some(&1), iter.next());
assert_eq!(Some(&6), iter.next_back());
assert_eq!(Some(&5), iter.next_back());
assert_eq!(Some(&2), iter.next());
assert_eq!(Some(&3), iter.next());
assert_eq!(Some(&4), iter.next());
assert_eq!(None, iter.next());
assert_eq!(None, iter.next_back());
§Remarks

The elements yielded by DoubleEndedIterator’s methods may differ from the ones yielded by Iterator’s methods:

let vec = vec![(1, 'a'), (1, 'b'), (1, 'c'), (2, 'a'), (2, 'b')];
let uniq_by_fst_comp = || {
    let mut seen = std::collections::HashSet::new();
    vec.iter().copied().filter(move |x| seen.insert(x.0))
};

assert_eq!(uniq_by_fst_comp().last(), Some((2, 'a')));
assert_eq!(uniq_by_fst_comp().next_back(), Some((2, 'b')));

assert_eq!(
    uniq_by_fst_comp().fold(vec![], |mut v, x| {v.push(x); v}),
    vec![(1, 'a'), (2, 'a')]
);
assert_eq!(
    uniq_by_fst_comp().rfold(vec![], |mut v, x| {v.push(x); v}),
    vec![(2, 'b'), (1, 'c')]
);

Provided Methods§

Source

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

🔬This is a nightly-only experimental API. (iter_advance_by)

Advances the iterator from the back by n elements.

advance_back_by is the reverse version of advance_by. This method will eagerly skip n elements starting from the back by calling next_back up to n times until None is encountered.

advance_back_by(n) will return Ok(()) if the iterator successfully advances by n elements, or a Err(NonZero<usize>) with value k if None is encountered, where k is remaining number of steps that could not be advanced because the iterator ran out. If self is empty and n is non-zero, then this returns Err(n). Otherwise, k is always less than n.

Calling advance_back_by(0) can do meaningful work, for example Flatten can advance its outer iterator until it finds an inner iterator that is not empty, which then often allows it to return a more accurate size_hint() than in its initial state.

§Examples

Basic usage:

#![feature(iter_advance_by)]

use std::num::NonZero;

let a = [3, 4, 5, 6];
let mut iter = a.iter();

assert_eq!(iter.advance_back_by(2), Ok(()));
assert_eq!(iter.next_back(), Some(&4));
assert_eq!(iter.advance_back_by(0), Ok(()));
assert_eq!(iter.advance_back_by(100), Err(NonZero::new(99).unwrap())); // only `&3` was skipped
1.37.0 (const: unstable) · Source

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

Returns the nth element from the end of the iterator.

This is essentially the reversed version of Iterator::nth(). Although like most indexing operations, the count starts from zero, so nth_back(0) returns the first value from the end, nth_back(1) the second, and so on.

Note that all elements between the end and the returned element will be consumed, including the returned element. This also means that calling nth_back(0) multiple times on the same iterator will return different elements.

nth_back() will return None if n is greater than or equal to the length of the iterator.

§Examples

Basic usage:

let a = [1, 2, 3];
assert_eq!(a.iter().nth_back(2), Some(&1));

Calling nth_back() multiple times doesn’t rewind the iterator:

let a = [1, 2, 3];

let mut iter = a.iter();

assert_eq!(iter.nth_back(1), Some(&2));
assert_eq!(iter.nth_back(1), None);

Returning None if there are less than n + 1 elements:

let a = [1, 2, 3];
assert_eq!(a.iter().nth_back(10), None);
1.27.0 (const: unstable) · Source

fn try_rfold<B, F, R>(&mut self, init: B, f: F) -> R
where Self: Sized, F: FnMut(B, Self::Item) -> R, R: Try<Output = B>,

This is the reverse version of Iterator::try_fold(): it takes elements starting from the back of the iterator.

§Examples

Basic usage:

let a = ["1", "2", "3"];
let sum = a.iter()
    .map(|&s| s.parse::<i32>())
    .try_rfold(0, |acc, x| x.and_then(|y| Ok(acc + y)));
assert_eq!(sum, Ok(6));

Short-circuiting:

let a = ["1", "rust", "3"];
let mut it = a.iter();
let sum = it
    .by_ref()
    .map(|&s| s.parse::<i32>())
    .try_rfold(0, |acc, x| x.and_then(|y| Ok(acc + y)));
assert!(sum.is_err());

// Because it short-circuited, the remaining elements are still
// available through the iterator.
assert_eq!(it.next_back(), Some(&"1"));
1.27.0 (const: unstable) · Source

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

An iterator method that reduces the iterator’s elements to a single, final value, starting from the back.

This is the reverse version of Iterator::fold(): it takes elements starting from the back of the iterator.

rfold() takes two arguments: an initial value, and a closure with two arguments: an ‘accumulator’, and an element. The closure returns the value that the accumulator should have for the next iteration.

The initial value is the value the accumulator will have on the first call.

After applying this closure to every element of the iterator, rfold() returns the accumulator.

This operation is sometimes called ‘reduce’ or ‘inject’.

Folding is useful whenever you have a collection of something, and want to produce a single value from it.

Note: rfold() combines elements in a right-associative fashion. For associative operators like +, the order the elements are combined in is not important, but for non-associative operators like - the order will affect the final result. For a left-associative version of rfold(), see Iterator::fold().

§Examples

Basic usage:

let a = [1, 2, 3];

// the sum of all of the elements of a
let sum = a.iter()
           .rfold(0, |acc, &x| acc + x);

assert_eq!(sum, 6);

This example demonstrates the right-associative nature of rfold(): it builds a string, starting with an initial value and continuing with each element from the back until the front:

let numbers = [1, 2, 3, 4, 5];

let zero = "0".to_string();

let result = numbers.iter().rfold(zero, |acc, &x| {
    format!("({x} + {acc})")
});

assert_eq!(result, "(1 + (2 + (3 + (4 + (5 + 0)))))");
1.27.0 (const: unstable) · Source

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

Searches for an element of an iterator from the back that satisfies a predicate.

rfind() takes a closure that returns true or false. It applies this closure to each element of the iterator, starting at the end, and if any of them return true, then rfind() returns Some(element). If they all return false, it returns None.

rfind() is short-circuiting; in other words, it will stop processing as soon as the closure returns true.

Because rfind() takes a reference, and many iterators iterate over references, this leads to a possibly confusing situation where the argument is a double reference. You can see this effect in the examples below, with &&x.

§Examples

Basic usage:

let a = [1, 2, 3];

assert_eq!(a.into_iter().rfind(|&x| x == 2), Some(2));
assert_eq!(a.into_iter().rfind(|&x| x == 5), None);

Iterating over references:

let a = [1, 2, 3];

// `iter()` yields references i.e. `&i32` and `rfind()` takes a
// reference to each element.
assert_eq!(a.iter().rfind(|&&x| x == 2), Some(&2));
assert_eq!(a.iter().rfind(|&&x| x == 5), None);

Stopping at the first true:

let a = [1, 2, 3];

let mut iter = a.iter();

assert_eq!(iter.rfind(|&&x| x == 2), Some(&2));

// we can still use `iter`, as there are more elements.
assert_eq!(iter.next_back(), Some(&1));

Implementors§

Source§

impl DoubleEndedIterator for regex::regexset::bytes::SetMatchesIntoIter

Source§

impl DoubleEndedIterator for regex::regexset::string::SetMatchesIntoIter

Source§

impl DoubleEndedIterator for serde_json::map::IntoIter

Source§

impl DoubleEndedIterator for serde_json::map::IntoValues

Source§

impl DoubleEndedIterator for toml::map::IntoIter

Source§

impl DoubleEndedIterator for RelayIdTypeIter

Source§

impl DoubleEndedIterator for DirEventIter

Source§

impl DoubleEndedIterator for SchedulingPolicyIter

Source§

impl DoubleEndedIterator for IntermediateIterator<'_>

1.6.0 · Source§

impl DoubleEndedIterator for alloc::string::Drain<'_>

Source§

impl DoubleEndedIterator for IntoChars

1.0.0 · Source§

impl DoubleEndedIterator for EscapeDefault

1.59.0 · Source§

impl DoubleEndedIterator for ToLowercase

Source§

impl DoubleEndedIterator for ToTitlecase

1.59.0 · Source§

impl DoubleEndedIterator for ToUppercase

1.0.0 · Source§

impl DoubleEndedIterator for core::str::iter::Bytes<'_>

1.12.0 · Source§

impl DoubleEndedIterator for Args

1.12.0 · Source§

impl DoubleEndedIterator for ArgsOs

Source§

impl<'a> DoubleEndedIterator for HexIterator<'a>

Source§

impl<'a> DoubleEndedIterator for ascii::ascii_str::Chars<'a>

Source§

impl<'a> DoubleEndedIterator for CharsMut<'a>

Source§

impl<'a> DoubleEndedIterator for CharsRef<'a>

Source§

impl<'a> DoubleEndedIterator for async_std::path::components::Components<'a>

Source§

impl<'a> DoubleEndedIterator for async_std::path::iter::Iter<'a>

Source§

impl<'a> DoubleEndedIterator for bstr::ext_slice::Bytes<'a>

Source§

impl<'a> DoubleEndedIterator for bstr::ext_slice::Lines<'a>

Source§

impl<'a> DoubleEndedIterator for LinesWithTerminator<'a>

Source§

impl<'a> DoubleEndedIterator for DrainBytes<'a>

Source§

impl<'a> DoubleEndedIterator for GraphemeIndices<'a>

Source§

impl<'a> DoubleEndedIterator for Graphemes<'a>

Source§

impl<'a> DoubleEndedIterator for bstr::utf8::CharIndices<'a>

Source§

impl<'a> DoubleEndedIterator for bstr::utf8::Chars<'a>

Source§

impl<'a> DoubleEndedIterator for HeadersIter<'a>

Source§

impl<'a> DoubleEndedIterator for regex::regexset::bytes::SetMatchesIter<'a>

Source§

impl<'a> DoubleEndedIterator for regex::regexset::string::SetMatchesIter<'a>

Source§

impl<'a> DoubleEndedIterator for PatternSetIter<'a>

Available on crate feature alloc only.
Source§

impl<'a> DoubleEndedIterator for serde_json::map::Iter<'a>

Source§

impl<'a> DoubleEndedIterator for serde_json::map::IterMut<'a>

Source§

impl<'a> DoubleEndedIterator for serde_json::map::Keys<'a>

Source§

impl<'a> DoubleEndedIterator for serde_json::map::Values<'a>

Source§

impl<'a> DoubleEndedIterator for serde_json::map::ValuesMut<'a>

Source§

impl<'a> DoubleEndedIterator for toml::map::Iter<'a>

Source§

impl<'a> DoubleEndedIterator for toml::map::IterMut<'a>

Source§

impl<'a> DoubleEndedIterator for toml::map::Keys<'a>

Source§

impl<'a> DoubleEndedIterator for toml::map::Values<'a>

Source§

impl<'a> DoubleEndedIterator for Utf8CharIndices<'a>

Source§

impl<'a> DoubleEndedIterator for ErrorReportingUtf8Chars<'a>

Source§

impl<'a> DoubleEndedIterator for Utf8Chars<'a>

1.60.0 · Source§

impl<'a> DoubleEndedIterator for EscapeAscii<'a>

1.0.0 · Source§

impl<'a> DoubleEndedIterator for core::str::iter::CharIndices<'a>

1.0.0 · Source§

impl<'a> DoubleEndedIterator for core::str::iter::Chars<'a>

1.0.0 · Source§

impl<'a> DoubleEndedIterator for core::str::iter::Lines<'a>

1.0.0 · Source§

impl<'a> DoubleEndedIterator for LinesAny<'a>

1.34.0 · Source§

impl<'a> DoubleEndedIterator for SplitAsciiWhitespace<'a>

1.1.0 · Source§

impl<'a> DoubleEndedIterator for SplitWhitespace<'a>

1.0.0 · Source§

impl<'a> DoubleEndedIterator for std::path::Components<'a>

1.0.0 · Source§

impl<'a> DoubleEndedIterator for std::path::Iter<'a>

Source§

impl<'a, 'h> DoubleEndedIterator for memchr::arch::all::memchr::OneIter<'a, 'h>

Source§

impl<'a, 'h> DoubleEndedIterator for memchr::arch::all::memchr::ThreeIter<'a, 'h>

Source§

impl<'a, 'h> DoubleEndedIterator for memchr::arch::all::memchr::TwoIter<'a, 'h>

Source§

impl<'a, 'h> DoubleEndedIterator for memchr::arch::x86_64::avx2::memchr::OneIter<'a, 'h>

Source§

impl<'a, 'h> DoubleEndedIterator for memchr::arch::x86_64::avx2::memchr::ThreeIter<'a, 'h>

Source§

impl<'a, 'h> DoubleEndedIterator for memchr::arch::x86_64::avx2::memchr::TwoIter<'a, 'h>

Source§

impl<'a, 'h> DoubleEndedIterator for memchr::arch::x86_64::sse2::memchr::OneIter<'a, 'h>

Source§

impl<'a, 'h> DoubleEndedIterator for memchr::arch::x86_64::sse2::memchr::ThreeIter<'a, 'h>

Source§

impl<'a, 'h> DoubleEndedIterator for memchr::arch::x86_64::sse2::memchr::TwoIter<'a, 'h>

1.0.0 · Source§

impl<'a, A> DoubleEndedIterator for core::option::Iter<'a, A>

1.0.0 · Source§

impl<'a, A> DoubleEndedIterator for core::option::IterMut<'a, A>

1.0.0 · Source§

impl<'a, I> DoubleEndedIterator for &'a mut I

Source§

impl<'a, I, P, H> DoubleEndedIterator for priority_queue::double_priority_queue::iterators::IterMut<'a, I, P, H>
where I: 'a, P: 'a + Ord, H: 'a + BuildHasher,

1.1.0 · Source§

impl<'a, I, T> DoubleEndedIterator for Cloned<I>
where T: 'a + Clone, I: DoubleEndedIterator<Item = &'a T>,

1.36.0 · Source§

impl<'a, I, T> DoubleEndedIterator for Copied<I>
where T: 'a + Copy, I: DoubleEndedIterator<Item = &'a T>,

Source§

impl<'a, K, V> DoubleEndedIterator for enum_map::iter::Iter<'a, K, V>
where K: EnumArray<V>,

Source§

impl<'a, K, V> DoubleEndedIterator for enum_map::iter::IterMut<'a, K, V>
where K: EnumArray<V>,

Source§

impl<'a, K, V> DoubleEndedIterator for phf::map::Entries<'a, K, V>

Source§

impl<'a, K, V> DoubleEndedIterator for phf::map::Keys<'a, K, V>

Source§

impl<'a, K, V> DoubleEndedIterator for phf::map::Values<'a, K, V>

Source§

impl<'a, K, V> DoubleEndedIterator for phf::ordered_map::Entries<'a, K, V>

Source§

impl<'a, K, V> DoubleEndedIterator for phf::ordered_map::Keys<'a, K, V>

Source§

impl<'a, K, V> DoubleEndedIterator for phf::ordered_map::Values<'a, K, V>

Source§

impl<'a, K, V> DoubleEndedIterator for toml::map::Iter<'a, K, V>

Source§

impl<'a, K, V> DoubleEndedIterator for toml::map::IterMut<'a, K, V>

Source§

impl<'a, K, V> DoubleEndedIterator for toml::map::Keys<'a, K, V>

Source§

impl<'a, K, V> DoubleEndedIterator for toml::map::Values<'a, K, V>

1.0.0 · Source§

impl<'a, K, V> DoubleEndedIterator for alloc::collections::btree::map::Iter<'a, K, V>
where K: 'a, V: 'a,

1.0.0 · Source§

impl<'a, K, V> DoubleEndedIterator for alloc::collections::btree::map::IterMut<'a, K, V>

1.0.0 · Source§

impl<'a, K, V> DoubleEndedIterator for alloc::collections::btree::map::Keys<'a, K, V>

1.17.0 · Source§

impl<'a, K, V> DoubleEndedIterator for alloc::collections::btree::map::Range<'a, K, V>

1.17.0 · Source§

impl<'a, K, V> DoubleEndedIterator for RangeMut<'a, K, V>

1.0.0 · Source§

impl<'a, K, V> DoubleEndedIterator for alloc::collections::btree::map::Values<'a, K, V>

1.10.0 · Source§

impl<'a, K, V> DoubleEndedIterator for alloc::collections::btree::map::ValuesMut<'a, K, V>

1.5.0 · Source§

impl<'a, P> DoubleEndedIterator for MatchIndices<'a, P>
where P: Pattern, <P as Pattern>::Searcher<'a>: DoubleEndedSearcher<'a>,

1.2.0 · Source§

impl<'a, P> DoubleEndedIterator for Matches<'a, P>
where P: Pattern, <P as Pattern>::Searcher<'a>: DoubleEndedSearcher<'a>,

1.5.0 · Source§

impl<'a, P> DoubleEndedIterator for RMatchIndices<'a, P>
where P: Pattern, <P as Pattern>::Searcher<'a>: DoubleEndedSearcher<'a>,

1.2.0 · Source§

impl<'a, P> DoubleEndedIterator for RMatches<'a, P>
where P: Pattern, <P as Pattern>::Searcher<'a>: DoubleEndedSearcher<'a>,

1.0.0 · Source§

impl<'a, P> DoubleEndedIterator for core::str::iter::RSplit<'a, P>
where P: Pattern, <P as Pattern>::Searcher<'a>: DoubleEndedSearcher<'a>,

1.0.0 · Source§

impl<'a, P> DoubleEndedIterator for RSplitTerminator<'a, P>
where P: Pattern, <P as Pattern>::Searcher<'a>: DoubleEndedSearcher<'a>,

1.0.0 · Source§

impl<'a, P> DoubleEndedIterator for core::str::iter::Split<'a, P>
where P: Pattern, <P as Pattern>::Searcher<'a>: DoubleEndedSearcher<'a>,

1.51.0 · Source§

impl<'a, P> DoubleEndedIterator for core::str::iter::SplitInclusive<'a, P>
where P: Pattern, <P as Pattern>::Searcher<'a>: DoubleEndedSearcher<'a>,

1.0.0 · Source§

impl<'a, P> DoubleEndedIterator for SplitTerminator<'a, P>
where P: Pattern, <P as Pattern>::Searcher<'a>: DoubleEndedSearcher<'a>,

Source§

impl<'a, T> DoubleEndedIterator for ValueIter<'a, T>
where T: 'a,

Source§

impl<'a, T> DoubleEndedIterator for ValueIterMut<'a, T>
where T: 'a,

Source§

impl<'a, T> DoubleEndedIterator for openssl::stack::Iter<'a, T>
where T: Stackable,

Source§

impl<'a, T> DoubleEndedIterator for openssl::stack::IterMut<'a, T>
where T: Stackable,

Source§

impl<'a, T> DoubleEndedIterator for phf::ordered_set::Iter<'a, T>

Source§

impl<'a, T> DoubleEndedIterator for phf::set::Iter<'a, T>

Source§

impl<'a, T> DoubleEndedIterator for smallvec::Drain<'a, T>
where T: 'a + Array,

Source§

impl<'a, T> DoubleEndedIterator for ZeroSliceIter<'a, T>
where T: AsULE,

1.0.0 · Source§

impl<'a, T> DoubleEndedIterator for alloc::collections::binary_heap::Iter<'a, T>

1.0.0 · Source§

impl<'a, T> DoubleEndedIterator for alloc::collections::btree::set::Iter<'a, T>

1.17.0 · Source§

impl<'a, T> DoubleEndedIterator for alloc::collections::btree::set::Range<'a, T>

1.0.0 · Source§

impl<'a, T> DoubleEndedIterator for alloc::collections::linked_list::Iter<'a, T>

1.0.0 · Source§

impl<'a, T> DoubleEndedIterator for alloc::collections::linked_list::IterMut<'a, T>

1.0.0 · Source§

impl<'a, T> DoubleEndedIterator for alloc::collections::vec_deque::iter::Iter<'a, T>

1.0.0 · Source§

impl<'a, T> DoubleEndedIterator for alloc::collections::vec_deque::iter_mut::IterMut<'a, T>

1.0.0 · Source§

impl<'a, T> DoubleEndedIterator for core::result::Iter<'a, T>

1.0.0 · Source§

impl<'a, T> DoubleEndedIterator for core::result::IterMut<'a, T>

1.0.0 · Source§

impl<'a, T> DoubleEndedIterator for core::slice::iter::Chunks<'a, T>

1.31.0 · Source§

impl<'a, T> DoubleEndedIterator for core::slice::iter::ChunksExact<'a, T>

1.31.0 · Source§

impl<'a, T> DoubleEndedIterator for core::slice::iter::ChunksExactMut<'a, T>

1.0.0 · Source§

impl<'a, T> DoubleEndedIterator for core::slice::iter::ChunksMut<'a, T>

1.0.0 · Source§

impl<'a, T> DoubleEndedIterator for core::slice::iter::Iter<'a, T>

1.0.0 · Source§

impl<'a, T> DoubleEndedIterator for core::slice::iter::IterMut<'a, T>

1.31.0 · Source§

impl<'a, T> DoubleEndedIterator for core::slice::iter::RChunks<'a, T>

1.31.0 · Source§

impl<'a, T> DoubleEndedIterator for core::slice::iter::RChunksExact<'a, T>

1.31.0 · Source§

impl<'a, T> DoubleEndedIterator for core::slice::iter::RChunksExactMut<'a, T>

1.31.0 · Source§

impl<'a, T> DoubleEndedIterator for core::slice::iter::RChunksMut<'a, T>

1.0.0 · Source§

impl<'a, T> DoubleEndedIterator for core::slice::iter::Windows<'a, T>

Source§

impl<'a, T, O> DoubleEndedIterator for ChunksExactMutNoAlias<'a, T, O>
where T: 'a + BitStore, O: BitOrder, ChunksExactMut<'a, T, O>: DoubleEndedIterator<Item = &'a mut BitSlice<<T as BitStore>::Alias, O>>,

Source§

impl<'a, T, O> DoubleEndedIterator for ChunksMutNoAlias<'a, T, O>
where T: 'a + BitStore, O: BitOrder, ChunksMut<'a, T, O>: DoubleEndedIterator<Item = &'a mut BitSlice<<T as BitStore>::Alias, O>>,

Source§

impl<'a, T, O> DoubleEndedIterator for bitvec::slice::iter::Iter<'a, T, O>
where T: 'a + BitStore, O: BitOrder,

Source§

impl<'a, T, O> DoubleEndedIterator for bitvec::slice::iter::IterMut<'a, T, O>
where T: 'a + BitStore, O: BitOrder,

Source§

impl<'a, T, O> DoubleEndedIterator for IterMutNoAlias<'a, T, O>
where T: 'a + BitStore, O: BitOrder, IterMut<'a, T, O>: DoubleEndedIterator<Item = <usize as BitSliceIndex<'a, <T as BitStore>::Alias, O>>::Mut>,

Source§

impl<'a, T, O> DoubleEndedIterator for RChunksExactMutNoAlias<'a, T, O>
where T: 'a + BitStore, O: BitOrder, RChunksExactMut<'a, T, O>: DoubleEndedIterator<Item = &'a mut BitSlice<<T as BitStore>::Alias, O>>,

Source§

impl<'a, T, O> DoubleEndedIterator for RChunksMutNoAlias<'a, T, O>
where T: 'a + BitStore, O: BitOrder, RChunksMut<'a, T, O>: DoubleEndedIterator<Item = &'a mut BitSlice<<T as BitStore>::Alias, O>>,

Source§

impl<'a, T, O, P> DoubleEndedIterator for bitvec::slice::iter::RSplit<'a, T, O, P>
where T: 'a + BitStore, O: BitOrder, P: FnMut(usize, &bool) -> bool,

Source§

impl<'a, T, O, P> DoubleEndedIterator for bitvec::slice::iter::RSplitMut<'a, T, O, P>
where T: 'a + BitStore, O: BitOrder, P: FnMut(usize, &bool) -> bool,

Source§

impl<'a, T, O, P> DoubleEndedIterator for RSplitMutNoAlias<'a, T, O, P>
where T: 'a + BitStore, O: BitOrder, P: FnMut(usize, &bool) -> bool, RSplitMut<'a, T, O, P>: DoubleEndedIterator<Item = &'a mut BitSlice<<T as BitStore>::Alias, O>>,

Source§

impl<'a, T, O, P> DoubleEndedIterator for RSplitNMutNoAlias<'a, T, O, P>
where T: 'a + BitStore, O: BitOrder, P: FnMut(usize, &bool) -> bool, RSplitNMut<'a, T, O, P>: DoubleEndedIterator<Item = &'a mut BitSlice<<T as BitStore>::Alias, O>>,

Source§

impl<'a, T, O, P> DoubleEndedIterator for bitvec::slice::iter::Split<'a, T, O, P>
where T: 'a + BitStore, O: BitOrder, P: FnMut(usize, &bool) -> bool,

Source§

impl<'a, T, O, P> DoubleEndedIterator for bitvec::slice::iter::SplitInclusive<'a, T, O, P>
where T: 'a + BitStore, O: BitOrder, P: FnMut(usize, &bool) -> bool,

Source§

impl<'a, T, O, P> DoubleEndedIterator for bitvec::slice::iter::SplitInclusiveMut<'a, T, O, P>
where T: 'a + BitStore, O: BitOrder, P: FnMut(usize, &bool) -> bool,

Source§

impl<'a, T, O, P> DoubleEndedIterator for SplitInclusiveMutNoAlias<'a, T, O, P>
where T: 'a + BitStore, O: BitOrder, P: FnMut(usize, &bool) -> bool, SplitInclusiveMut<'a, T, O, P>: DoubleEndedIterator<Item = &'a mut BitSlice<<T as BitStore>::Alias, O>>,

Source§

impl<'a, T, O, P> DoubleEndedIterator for bitvec::slice::iter::SplitMut<'a, T, O, P>
where T: 'a + BitStore, O: BitOrder, P: FnMut(usize, &bool) -> bool,

Source§

impl<'a, T, O, P> DoubleEndedIterator for SplitMutNoAlias<'a, T, O, P>
where T: 'a + BitStore, O: BitOrder, P: FnMut(usize, &bool) -> bool, SplitMut<'a, T, O, P>: DoubleEndedIterator<Item = &'a mut BitSlice<<T as BitStore>::Alias, O>>,

Source§

impl<'a, T, O, P> DoubleEndedIterator for SplitNMutNoAlias<'a, T, O, P>
where T: 'a + BitStore, O: BitOrder, P: FnMut(usize, &bool) -> bool, SplitNMut<'a, T, O, P>: DoubleEndedIterator<Item = &'a mut BitSlice<<T as BitStore>::Alias, O>>,

1.77.0 · Source§

impl<'a, T, P> DoubleEndedIterator for ChunkBy<'a, T, P>
where T: 'a, P: FnMut(&T, &T) -> bool,

1.77.0 · Source§

impl<'a, T, P> DoubleEndedIterator for ChunkByMut<'a, T, P>
where T: 'a, P: FnMut(&T, &T) -> bool,

1.27.0 · Source§

impl<'a, T, P> DoubleEndedIterator for core::slice::iter::RSplit<'a, T, P>
where P: FnMut(&T) -> bool,

1.27.0 · Source§

impl<'a, T, P> DoubleEndedIterator for core::slice::iter::RSplitMut<'a, T, P>
where P: FnMut(&T) -> bool,

1.0.0 · Source§

impl<'a, T, P> DoubleEndedIterator for core::slice::iter::Split<'a, T, P>
where P: FnMut(&T) -> bool,

1.51.0 · Source§

impl<'a, T, P> DoubleEndedIterator for core::slice::iter::SplitInclusive<'a, T, P>
where P: FnMut(&T) -> bool,

1.51.0 · Source§

impl<'a, T, P> DoubleEndedIterator for core::slice::iter::SplitInclusiveMut<'a, T, P>
where P: FnMut(&T) -> bool,

1.0.0 · Source§

impl<'a, T, P> DoubleEndedIterator for core::slice::iter::SplitMut<'a, T, P>
where P: FnMut(&T) -> bool,

Source§

impl<'a, T, const CAP: usize> DoubleEndedIterator for arrayvec::arrayvec::Drain<'a, T, CAP>
where T: 'a,

1.94.0 · Source§

impl<'a, T, const N: usize> DoubleEndedIterator for ArrayWindows<'a, T, N>

Source§

impl<'a, V> DoubleEndedIterator for enum_map::iter::Values<'a, V>
where V: 'a,

Source§

impl<'a, V> DoubleEndedIterator for enum_map::iter::ValuesMut<'a, V>
where V: 'a,

Source§

impl<'h> DoubleEndedIterator for Memchr2<'h>

Source§

impl<'h> DoubleEndedIterator for Memchr3<'h>

Source§

impl<'h> DoubleEndedIterator for Memchr<'h>

Source§

impl<A> DoubleEndedIterator for itertools::repeatn::RepeatN<A>
where A: Clone,

Source§

impl<A> DoubleEndedIterator for itertools::ziptuple::Zip<(A,)>

Source§

impl<A> DoubleEndedIterator for num_iter::Range<A>
where A: Integer + Clone + ToPrimitive,

Integer is required to ensure the range will be the same regardless of the direction it is consumed.

Source§

impl<A> DoubleEndedIterator for num_iter::RangeInclusive<A>
where A: Sub<Output = A> + Integer + Clone + ToPrimitive,

Source§

impl<A> DoubleEndedIterator for smallvec::IntoIter<A>
where A: Array,

1.0.0 · Source§

impl<A> DoubleEndedIterator for core::ops::range::Range<A>
where A: Step,

1.26.0 · Source§

impl<A> DoubleEndedIterator for core::ops::range::RangeInclusive<A>
where A: Step,

1.0.0 · Source§

impl<A> DoubleEndedIterator for core::option::IntoIter<A>

Source§

impl<A> DoubleEndedIterator for OptionFlatten<A>

1.95.0 · Source§

impl<A> DoubleEndedIterator for RangeInclusiveIter<A>
where A: Step,

1.96.0 · Source§

impl<A> DoubleEndedIterator for RangeIter<A>
where A: Step,

1.0.0 · Source§

impl<A> DoubleEndedIterator for Repeat<A>
where A: Clone,

1.82.0 · Source§

impl<A> DoubleEndedIterator for tor_hsservice::internal_prelude::iter::RepeatN<A>
where A: Clone,

Source§

impl<A, B> DoubleEndedIterator for itertools::ziptuple::Zip<(A, B)>

1.0.0 · Source§

impl<A, B> DoubleEndedIterator for Chain<A, B>

1.0.0 · Source§

impl<A, B> DoubleEndedIterator for tor_hsservice::internal_prelude::iter::Zip<A, B>

Source§

impl<A, B, C> DoubleEndedIterator for itertools::ziptuple::Zip<(A, B, C)>

Source§

impl<A, B, C, D> DoubleEndedIterator for itertools::ziptuple::Zip<(A, B, C, D)>

Source§

impl<A, B, C, D, E> DoubleEndedIterator for itertools::ziptuple::Zip<(A, B, C, D, E)>

Source§

impl<A, B, C, D, E, F> DoubleEndedIterator for itertools::ziptuple::Zip<(A, B, C, D, E, F)>

Source§

impl<A, B, C, D, E, F, G> DoubleEndedIterator for itertools::ziptuple::Zip<(A, B, C, D, E, F, G)>

Source§

impl<A, B, C, D, E, F, G, H> DoubleEndedIterator for itertools::ziptuple::Zip<(A, B, C, D, E, F, G, H)>

Source§

impl<A, B, C, D, E, F, G, H, I> DoubleEndedIterator for itertools::ziptuple::Zip<(A, B, C, D, E, F, G, H, I)>

Source§

impl<A, B, C, D, E, F, G, H, I, J> DoubleEndedIterator for itertools::ziptuple::Zip<(A, B, C, D, E, F, G, H, I, J)>

Source§

impl<A, B, C, D, E, F, G, H, I, J, K> DoubleEndedIterator for itertools::ziptuple::Zip<(A, B, C, D, E, F, G, H, I, J, K)>

Source§

impl<A, B, C, D, E, F, G, H, I, J, K, L> DoubleEndedIterator for itertools::ziptuple::Zip<(A, B, C, D, E, F, G, H, I, J, K, L)>

1.43.0 · Source§

impl<A, F> DoubleEndedIterator for OnceWith<F>
where F: FnOnce() -> A,

Source§

impl<A, O> DoubleEndedIterator for bitvec::array::iter::IntoIter<A, O>
where A: BitViewSized, O: BitOrder,

1.0.0 · Source§

impl<B, I, F> DoubleEndedIterator for FilterMap<I, F>
where I: DoubleEndedIterator, F: FnMut(<I as Iterator>::Item) -> Option<B>,

1.0.0 · Source§

impl<B, I, F> DoubleEndedIterator for Map<I, F>
where I: DoubleEndedIterator, F: FnMut(<I as Iterator>::Item) -> B,

Source§

impl<I> DoubleEndedIterator for RcIter<I>

Source§

impl<I> DoubleEndedIterator for Unique<I>
where I: DoubleEndedIterator, <I as Iterator>::Item: Eq + Hash + Clone,

Source§

impl<I> DoubleEndedIterator for Bidi<I>

Source§

impl<I> DoubleEndedIterator for ByRefSized<'_, I>

1.0.0 · Source§

impl<I> DoubleEndedIterator for Enumerate<I>

1.0.0 · Source§

impl<I> DoubleEndedIterator for Fuse<I>

1.38.0 · Source§

impl<I> DoubleEndedIterator for Peekable<I>

1.0.0 · Source§

impl<I> DoubleEndedIterator for Rev<I>

1.9.0 · Source§

impl<I> DoubleEndedIterator for Skip<I>

1.38.0 · Source§

impl<I> DoubleEndedIterator for StepBy<I>

1.38.0 · Source§

impl<I> DoubleEndedIterator for Take<I>

1.0.0 · Source§

impl<I, A> DoubleEndedIterator for Box<I, A>

Source§

impl<I, A> DoubleEndedIterator for alloc::collections::vec_deque::splice::Splice<'_, I, A>
where I: Iterator, A: Allocator,

1.21.0 · Source§

impl<I, A> DoubleEndedIterator for alloc::vec::splice::Splice<'_, I, A>
where I: Iterator, A: Allocator,

Source§

impl<I, F> DoubleEndedIterator for Positions<I, F>

Source§

impl<I, F> DoubleEndedIterator for Update<I, F>
where I: DoubleEndedIterator, F: FnMut(&mut <I as Iterator>::Item),

Source§

impl<I, F> DoubleEndedIterator for PadUsing<I, F>

1.0.0 · Source§

impl<I, F> DoubleEndedIterator for Inspect<I, F>
where I: DoubleEndedIterator, F: FnMut(&<I as Iterator>::Item),

Source§

impl<I, F, T, E> DoubleEndedIterator for FilterOk<I, F>
where I: DoubleEndedIterator<Item = Result<T, E>>, F: FnMut(&T) -> bool,

Source§

impl<I, F, T, U, E> DoubleEndedIterator for FilterMapOk<I, F>
where I: DoubleEndedIterator<Item = Result<T, E>>, F: FnMut(T) -> Option<U>,

Source§

impl<I, K, V, S> DoubleEndedIterator for indexmap::map::iter::Splice<'_, I, K, V, S>
where I: Iterator<Item = (K, V)>, K: Hash + Eq, S: BuildHasher,

Source§

impl<I, P> DoubleEndedIterator for priority_queue::core_iterators::Drain<'_, I, P>

Source§

impl<I, P> DoubleEndedIterator for priority_queue::core_iterators::IntoIter<I, P>

Source§

impl<I, P> DoubleEndedIterator for priority_queue::core_iterators::Iter<'_, I, P>

1.0.0 · Source§

impl<I, P> DoubleEndedIterator for Filter<I, P>
where I: DoubleEndedIterator, P: FnMut(&<I as Iterator>::Item) -> bool,

Source§

impl<I, P, H> DoubleEndedIterator for IntoSortedIter<I, P, H>
where P: Ord,

Source§

impl<I, T, E> DoubleEndedIterator for FlattenOk<I, T, E>

Source§

impl<I, T, E> DoubleEndedIterator for ProcessResults<'_, I, E>
where I: Iterator<Item = Result<T, E>> + DoubleEndedIterator,

Source§

impl<I, T, S> DoubleEndedIterator for indexmap::set::iter::Splice<'_, I, T, S>
where I: Iterator<Item = T>, T: Hash + Eq, S: BuildHasher,

1.29.0 · Source§

impl<I, U> DoubleEndedIterator for Flatten<I>
where I: DoubleEndedIterator, <I as Iterator>::Item: IntoIterator<IntoIter = U, Item = <U as Iterator>::Item>, U: DoubleEndedIterator,

1.0.0 · Source§

impl<I, U, F> DoubleEndedIterator for FlatMap<I, U, F>

Source§

impl<I, V, F> DoubleEndedIterator for UniqueBy<I, V, F>
where I: DoubleEndedIterator, V: Eq + Hash, F: FnMut(&<I as Iterator>::Item) -> V,

Source§

impl<I, const N: usize> DoubleEndedIterator for ArrayChunks<I, N>

Source§

impl<K, V> DoubleEndedIterator for enum_map::iter::IntoIter<K, V>
where K: EnumArray<V>,

Source§

impl<K, V> DoubleEndedIterator for enum_map::iter::IntoValues<K, V>
where K: EnumArray<V>,

Source§

impl<K, V> DoubleEndedIterator for indexmap::map::iter::Drain<'_, K, V>

Source§

impl<K, V> DoubleEndedIterator for indexmap::map::iter::IntoIter<K, V>

Source§

impl<K, V> DoubleEndedIterator for indexmap::map::iter::IntoKeys<K, V>

Source§

impl<K, V> DoubleEndedIterator for indexmap::map::iter::IntoValues<K, V>

Source§

impl<K, V> DoubleEndedIterator for indexmap::map::iter::Iter<'_, K, V>

Source§

impl<K, V> DoubleEndedIterator for IterMut2<'_, K, V>

Source§

impl<K, V> DoubleEndedIterator for indexmap::map::iter::IterMut<'_, K, V>

Source§

impl<K, V> DoubleEndedIterator for indexmap::map::iter::Keys<'_, K, V>

Source§

impl<K, V> DoubleEndedIterator for indexmap::map::iter::Values<'_, K, V>

Source§

impl<K, V> DoubleEndedIterator for indexmap::map::iter::ValuesMut<'_, K, V>

Source§

impl<K, V> DoubleEndedIterator for toml::map::IntoIter<K, V>

1.0.0 · Source§

impl<K, V, A> DoubleEndedIterator for alloc::collections::btree::map::IntoIter<K, V, A>
where A: Allocator + Clone,

1.54.0 · Source§

impl<K, V, A> DoubleEndedIterator for alloc::collections::btree::map::IntoKeys<K, V, A>
where A: Allocator + Clone,

1.54.0 · Source§

impl<K, V, A> DoubleEndedIterator for alloc::collections::btree::map::IntoValues<K, V, A>
where A: Allocator + Clone,

Source§

impl<L, R> DoubleEndedIterator for Either<L, R>

Source§

impl<L, R> DoubleEndedIterator for IterEither<L, R>

Source§

impl<M, T, O> DoubleEndedIterator for BitPtrRange<M, T, O>
where M: Mutability, T: BitStore, O: BitOrder,

Source§

impl<P> DoubleEndedIterator for RawSplit<'_, P>
where P: Pattern,

Source§

impl<T> DoubleEndedIterator for EnumSetIter<T>
where T: EnumSetType,

Source§

impl<T> DoubleEndedIterator for indexmap::set::iter::Drain<'_, T>

Source§

impl<T> DoubleEndedIterator for indexmap::set::iter::IntoIter<T>

Source§

impl<T> DoubleEndedIterator for indexmap::set::iter::Iter<'_, T>

Source§

impl<T> DoubleEndedIterator for openssl::stack::IntoIter<T>
where T: Stackable,

Source§

impl<T> DoubleEndedIterator for AncillaryIter<'_, T>

Source§

impl<T> DoubleEndedIterator for slab::Drain<'_, T>

Source§

impl<T> DoubleEndedIterator for slab::IntoIter<T>

Source§

impl<T> DoubleEndedIterator for slab::Iter<'_, T>

Source§

impl<T> DoubleEndedIterator for slab::IterMut<'_, T>

1.0.0 · Source§

impl<T> DoubleEndedIterator for core::result::IntoIter<T>

1.2.0 · Source§

impl<T> DoubleEndedIterator for Empty<T>

1.2.0 · Source§

impl<T> DoubleEndedIterator for Once<T>

1.82.0 · Source§

impl<T> DoubleEndedIterator for Take<Repeat<T>>
where T: Clone,

1.6.0 · Source§

impl<T, A> DoubleEndedIterator for alloc::collections::binary_heap::Drain<'_, T, A>
where A: Allocator,

1.0.0 · Source§

impl<T, A> DoubleEndedIterator for alloc::collections::binary_heap::IntoIter<T, A>
where A: Allocator,

1.0.0 · Source§

impl<T, A> DoubleEndedIterator for alloc::collections::btree::set::IntoIter<T, A>
where A: Allocator + Clone,

1.0.0 · Source§

impl<T, A> DoubleEndedIterator for alloc::collections::linked_list::IntoIter<T, A>
where A: Allocator,

1.6.0 · Source§

impl<T, A> DoubleEndedIterator for alloc::collections::vec_deque::drain::Drain<'_, T, A>
where A: Allocator,

1.0.0 · Source§

impl<T, A> DoubleEndedIterator for alloc::collections::vec_deque::into_iter::IntoIter<T, A>
where A: Allocator,

1.6.0 · Source§

impl<T, A> DoubleEndedIterator for alloc::vec::drain::Drain<'_, T, A>
where A: Allocator,

1.0.0 · Source§

impl<T, A> DoubleEndedIterator for alloc::vec::into_iter::IntoIter<T, A>
where A: Allocator,

Source§

impl<T, N> DoubleEndedIterator for GenericArrayIter<T, N>
where N: ArrayLength<T>,

Source§

impl<T, O> DoubleEndedIterator for Domain<'_, Const, T, O>
where T: BitStore, O: BitOrder,

Source§

impl<T, O> DoubleEndedIterator for bitvec::boxed::iter::IntoIter<T, O>
where T: BitStore, O: BitOrder,

Source§

impl<T, O> DoubleEndedIterator for BitValIter<'_, T, O>
where T: BitStore, O: BitOrder,

Source§

impl<T, O> DoubleEndedIterator for bitvec::slice::iter::Chunks<'_, T, O>
where T: BitStore, O: BitOrder,

Source§

impl<T, O> DoubleEndedIterator for bitvec::slice::iter::ChunksExact<'_, T, O>
where T: BitStore, O: BitOrder,

Source§

impl<T, O> DoubleEndedIterator for bitvec::slice::iter::ChunksExactMut<'_, T, O>
where T: BitStore, O: BitOrder,

Source§

impl<T, O> DoubleEndedIterator for bitvec::slice::iter::ChunksMut<'_, T, O>
where T: BitStore, O: BitOrder,

Source§

impl<T, O> DoubleEndedIterator for IterOnes<'_, T, O>
where T: BitStore, O: BitOrder,

Source§

impl<T, O> DoubleEndedIterator for IterZeros<'_, T, O>
where T: BitStore, O: BitOrder,

Source§

impl<T, O> DoubleEndedIterator for bitvec::slice::iter::RChunks<'_, T, O>
where T: BitStore, O: BitOrder,

Source§

impl<T, O> DoubleEndedIterator for bitvec::slice::iter::RChunksExact<'_, T, O>
where T: BitStore, O: BitOrder,

Source§

impl<T, O> DoubleEndedIterator for bitvec::slice::iter::RChunksExactMut<'_, T, O>
where T: BitStore, O: BitOrder,

Source§

impl<T, O> DoubleEndedIterator for bitvec::slice::iter::RChunksMut<'_, T, O>
where T: BitStore, O: BitOrder,

Source§

impl<T, O> DoubleEndedIterator for bitvec::slice::iter::Windows<'_, T, O>
where T: BitStore, O: BitOrder,

Source§

impl<T, O> DoubleEndedIterator for bitvec::vec::iter::Drain<'_, T, O>
where T: BitStore, O: BitOrder,

Available on non-tarpaulin_include only.
Source§

impl<T, O, I> DoubleEndedIterator for bitvec::vec::iter::Splice<'_, T, O, I>
where T: BitStore, O: BitOrder, I: Iterator<Item = bool>,

Available on non-tarpaulin_include only.
Source§

impl<T, S1, S2> DoubleEndedIterator for SymmetricDifference<'_, T, S1, S2>
where T: Eq + Hash, S1: BuildHasher, S2: BuildHasher,

Source§

impl<T, S> DoubleEndedIterator for Difference<'_, T, S>
where T: Eq + Hash, S: BuildHasher,

Source§

impl<T, S> DoubleEndedIterator for Intersection<'_, T, S>
where T: Eq + Hash, S: BuildHasher,

Source§

impl<T, S> DoubleEndedIterator for Union<'_, T, S>
where T: Eq + Hash, S: BuildHasher,

Source§

impl<T, U> DoubleEndedIterator for ZipLongest<T, U>

Source§

impl<T, const CAP: usize> DoubleEndedIterator for arrayvec::arrayvec::IntoIter<T, CAP>

1.40.0 · Source§

impl<T, const N: usize> DoubleEndedIterator for core::array::iter::IntoIter<T, N>