rustmax::derive_more::core::range::legacy

Struct Range

Source
pub struct Range<Idx> {
    pub start: Idx,
    pub end: Idx,
}
๐Ÿ”ฌThis is a nightly-only experimental API. (new_range_api)
Expand description

A (half-open) range bounded inclusively below and exclusively above (start..end).

The range start..end contains all values with start <= x < end. It is empty if start >= end.

ยงExamples

The start..end syntax is a Range:

assert_eq!((3..5), std::ops::Range { start: 3, end: 5 });
assert_eq!(3 + 4 + 5, (3..6).sum());
let arr = [0, 1, 2, 3, 4];
assert_eq!(arr[ ..  ], [0, 1, 2, 3, 4]);
assert_eq!(arr[ .. 3], [0, 1, 2      ]);
assert_eq!(arr[ ..=3], [0, 1, 2, 3   ]);
assert_eq!(arr[1..  ], [   1, 2, 3, 4]);
assert_eq!(arr[1.. 3], [   1, 2      ]); // This is a `Range`
assert_eq!(arr[1..=3], [   1, 2, 3   ]);

Fieldsยง

ยงstart: Idx
๐Ÿ”ฌThis is a nightly-only experimental API. (new_range_api)

The lower bound of the range (inclusive).

ยงend: Idx
๐Ÿ”ฌThis is a nightly-only experimental API. (new_range_api)

The upper bound of the range (exclusive).

Implementationsยง

Sourceยง

impl<Idx> Range<Idx>
where Idx: PartialOrd,

1.35.0 ยท Source

pub fn contains<U>(&self, item: &U) -> bool
where Idx: PartialOrd<U>, U: PartialOrd<Idx> + ?Sized,

Returns true if item is contained in the range.

ยงExamples
assert!(!(3..5).contains(&2));
assert!( (3..5).contains(&3));
assert!( (3..5).contains(&4));
assert!(!(3..5).contains(&5));

assert!(!(3..3).contains(&3));
assert!(!(3..2).contains(&3));

assert!( (0.0..1.0).contains(&0.5));
assert!(!(0.0..1.0).contains(&f32::NAN));
assert!(!(0.0..f32::NAN).contains(&0.5));
assert!(!(f32::NAN..1.0).contains(&0.5));
1.47.0 ยท Source

pub fn is_empty(&self) -> bool

Returns true if the range contains no items.

ยงExamples
assert!(!(3..5).is_empty());
assert!( (3..3).is_empty());
assert!( (3..2).is_empty());

The range is empty if either side is incomparable:

assert!(!(3.0..5.0).is_empty());
assert!( (3.0..f32::NAN).is_empty());
assert!( (f32::NAN..5.0).is_empty());

Trait Implementationsยง

Sourceยง

impl<A> Arbitrary for Range<A>
where A: PartialOrd + Arbitrary,

Sourceยง

type Parameters = (<A as Arbitrary>::Parameters, <A as Arbitrary>::Parameters)

The type of parameters that arbitrary_with accepts for configuration of the generated Strategy. Parameters must implement Default.
Sourceยง

type Strategy = Map<<(A, A) as Arbitrary>::Strategy, fn(_: (A, A)) -> Range<A>>

The type of Strategy used to generate values of type Self.
Sourceยง

fn arbitrary_with( args: <Range<A> as Arbitrary>::Parameters, ) -> <Range<A> as Arbitrary>::Strategy โ“˜

Generates a Strategy for producing arbitrary values of type the implementing type (Self). The strategy is passed the arguments given in args. Read more
Sourceยง

fn arbitrary() -> Self::Strategy

Generates a Strategy for producing arbitrary values of type the implementing type (Self). Read more
Sourceยง

impl<A> ArbitraryF1<A> for Range<A>
where A: Debug + PartialOrd,

Sourceยง

type Parameters = ()

The type of parameters that lift1_with accepts for configuration of the lifted and generated Strategy. Parameters must implement Default.
Sourceยง

fn lift1_with<S>( base: S, _args: <Range<A> as ArbitraryF1<A>>::Parameters, ) -> BoxedStrategy<Range<A>>
where S: Strategy<Value = A> + 'static,

Lifts a given Strategy to a new Strategy for the (presumably) bigger type. This is useful for lifting a Strategy for SomeType to a container such as Vec of SomeType. The composite strategy is passed the arguments given in args. Read more
Sourceยง

fn lift1<AS>(base: AS) -> BoxedStrategy<Self>
where AS: Strategy<Value = A> + 'static,

Lifts a given Strategy to a new Strategy for the (presumably) bigger type. This is useful for lifting a Strategy for SomeType to a container such as Vec<SomeType>. Read more
1.0.0 ยท Sourceยง

impl<Idx> Clone for Range<Idx>
where Idx: Clone,

Sourceยง

fn clone(&self) -> Range<Idx> โ“˜

Returns a copy of the value. Read more
1.0.0 ยท Sourceยง

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Sourceยง

impl<C1, C2> ContainsToken<C1> for Range<C2>
where C1: AsChar, C2: AsChar + Clone,

Sourceยง

fn contains_token(&self, token: C1) -> bool

Returns true if self contains the token
1.0.0 ยท Sourceยง

impl<Idx> Debug for Range<Idx>
where Idx: Debug,

Sourceยง

fn fmt(&self, fmt: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
1.0.0 ยท Sourceยง

impl<Idx> Default for Range<Idx>
where Idx: Default,

Sourceยง

fn default() -> Range<Idx> โ“˜

Returns the โ€œdefault valueโ€ for a type. Read more
Sourceยง

impl<'de, Idx> Deserialize<'de> for Range<Idx>
where Idx: Deserialize<'de>,

Sourceยง

fn deserialize<D>( deserializer: D, ) -> Result<Range<Idx>, <D as Deserializer<'de>>::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
1.0.0 ยท Sourceยง

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

Sourceยง

fn next_back(&mut self) -> Option<A>

Removes and returns an element from the end of the iterator. Read more
Sourceยง

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

Returns the nth element from the end of the iterator. Read more
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. Read more
1.27.0 ยท 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. Read more
1.27.0 ยท 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. Read more
1.27.0 ยท 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. Read more
1.0.0 ยท Sourceยง

impl ExactSizeIterator for Range<i16>

1.0.0 ยท Sourceยง

fn len(&self) -> usize

Returns the exact remaining length of the iterator. Read more
Sourceยง

fn is_empty(&self) -> bool

๐Ÿ”ฌThis is a nightly-only experimental API. (exact_size_is_empty)
Returns true if the iterator is empty. Read more
1.0.0 ยท Sourceยง

impl ExactSizeIterator for Range<i32>

1.0.0 ยท Sourceยง

fn len(&self) -> usize

Returns the exact remaining length of the iterator. Read more
Sourceยง

fn is_empty(&self) -> bool

๐Ÿ”ฌThis is a nightly-only experimental API. (exact_size_is_empty)
Returns true if the iterator is empty. Read more
1.0.0 ยท Sourceยง

impl ExactSizeIterator for Range<i8>

1.0.0 ยท Sourceยง

fn len(&self) -> usize

Returns the exact remaining length of the iterator. Read more
Sourceยง

fn is_empty(&self) -> bool

๐Ÿ”ฌThis is a nightly-only experimental API. (exact_size_is_empty)
Returns true if the iterator is empty. Read more
1.0.0 ยท Sourceยง

impl ExactSizeIterator for Range<isize>

1.0.0 ยท Sourceยง

fn len(&self) -> usize

Returns the exact remaining length of the iterator. Read more
Sourceยง

fn is_empty(&self) -> bool

๐Ÿ”ฌThis is a nightly-only experimental API. (exact_size_is_empty)
Returns true if the iterator is empty. Read more
1.0.0 ยท Sourceยง

impl ExactSizeIterator for Range<u16>

1.0.0 ยท Sourceยง

fn len(&self) -> usize

Returns the exact remaining length of the iterator. Read more
Sourceยง

fn is_empty(&self) -> bool

๐Ÿ”ฌThis is a nightly-only experimental API. (exact_size_is_empty)
Returns true if the iterator is empty. Read more
1.0.0 ยท Sourceยง

impl ExactSizeIterator for Range<u32>

1.0.0 ยท Sourceยง

fn len(&self) -> usize

Returns the exact remaining length of the iterator. Read more
Sourceยง

fn is_empty(&self) -> bool

๐Ÿ”ฌThis is a nightly-only experimental API. (exact_size_is_empty)
Returns true if the iterator is empty. Read more
1.0.0 ยท Sourceยง

impl ExactSizeIterator for Range<u8>

1.0.0 ยท Sourceยง

fn len(&self) -> usize

Returns the exact remaining length of the iterator. Read more
Sourceยง

fn is_empty(&self) -> bool

๐Ÿ”ฌThis is a nightly-only experimental API. (exact_size_is_empty)
Returns true if the iterator is empty. Read more
1.0.0 ยท Sourceยง

impl ExactSizeIterator for Range<usize>

1.0.0 ยท Sourceยง

fn len(&self) -> usize

Returns the exact remaining length of the iterator. Read more
Sourceยง

fn is_empty(&self) -> bool

๐Ÿ”ฌThis is a nightly-only experimental API. (exact_size_is_empty)
Returns true if the iterator is empty. Read more
Sourceยง

impl<'h> From<Match<'h>> for Range<usize>

Sourceยง

fn from(m: Match<'h>) -> Range<usize> โ“˜

Converts to this type from the input type.
Sourceยง

impl<'h> From<Match<'h>> for Range<usize>

Sourceยง

fn from(m: Match<'h>) -> Range<usize> โ“˜

Converts to this type from the input type.
Sourceยง

impl<T> From<Range<T>> for Range<T>

Sourceยง

fn from(value: Range<T>) -> Range<T> โ“˜

Converts to this type from the input type.
Sourceยง

impl<T> From<Range<T>> for Range<T>

Sourceยง

fn from(value: Range<T>) -> Range<T>

Converts to this type from the input type.
Sourceยง

impl<X> From<Range<X>> for Uniform<X>
where X: SampleUniform,

Sourceยง

fn from(r: Range<X>) -> Uniform<X>

Converts to this type from the input type.
Sourceยง

impl From<Range<i64>> for ValueParser

Create an i64 ValueParser from a N..M range

See RangedI64ValueParser for more control over the output type.

See also RangedU64ValueParser

ยงExamples

let mut cmd = clap::Command::new("raw")
    .arg(
        clap::Arg::new("port")
            .long("port")
            .value_parser(3000..4000)
            .action(clap::ArgAction::Set)
            .required(true)
    );

let m = cmd.try_get_matches_from_mut(["cmd", "--port", "3001"]).unwrap();
let port: i64 = *m.get_one("port")
    .expect("required");
assert_eq!(port, 3001);
Sourceยง

fn from(value: Range<i64>) -> ValueParser

Converts to this type from the input type.
Sourceยง

impl From<Range<usize>> for Range

Sourceยง

fn from(range: Range<usize>) -> Range

Converts to this type from the input type.
Sourceยง

impl From<Range<usize>> for SizeRange

Given low .. high, then a size range [low, high) is the result.

Sourceยง

fn from(r: Range<usize>) -> SizeRange

Converts to this type from the input type.
Sourceยง

impl From<Range<usize>> for Span

Sourceยง

fn from(range: Range<usize>) -> Span

Converts to this type from the input type.
Sourceยง

impl From<Range<usize>> for Span

Sourceยง

fn from(range: Range<usize>) -> Span

Converts to this type from the input type.
Sourceยง

impl From<Range<usize>> for ValueRange

Sourceยง

fn from(range: Range<usize>) -> ValueRange

Converts to this type from the input type.
Sourceยง

impl From<SizeRange> for Range<usize>

Sourceยง

fn from(size_range: SizeRange) -> Range<usize> โ“˜

Converts to this type from the input type.
Sourceยง

impl From<Span> for Range<usize>

Sourceยง

fn from(span: Span) -> Range<usize> โ“˜

Converts to this type from the input type.
Sourceยง

impl From<Span> for Range<usize>

Sourceยง

fn from(span: Span) -> Range<usize> โ“˜

Converts to this type from the input type.
1.0.0 ยท Sourceยง

impl<Idx> Hash for Range<Idx>
where Idx: Hash,

Sourceยง

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 ยท Sourceยง

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Sourceยง

impl Index<Range<Position>> for Url

Sourceยง

type Output = str

The returned type after indexing.
Sourceยง

fn index(&self, range: Range<Position>) -> &str

Performs the indexing (container[index]) operation. Read more
Sourceยง

impl Index<Range<usize>> for BStr

Sourceยง

type Output = BStr

The returned type after indexing.
Sourceยง

fn index(&self, r: Range<usize>) -> &BStr

Performs the indexing (container[index]) operation. Read more
Sourceยง

impl Index<Range<usize>> for BStr

Sourceยง

type Output = BStr

The returned type after indexing.
Sourceยง

fn index(&self, r: Range<usize>) -> &BStr

Performs the indexing (container[index]) operation. Read more
Sourceยง

impl Index<Range<usize>> for Bytes

Sourceยง

type Output = Bytes

The returned type after indexing.
Sourceยง

fn index(&self, r: Range<usize>) -> &Bytes

Performs the indexing (container[index]) operation. Read more
Sourceยง

impl<K, V, S> Index<Range<usize>> for IndexMap<K, V, S>

Sourceยง

type Output = Slice<K, V>

The returned type after indexing.
Sourceยง

fn index( &self, range: Range<usize>, ) -> &<IndexMap<K, V, S> as Index<Range<usize>>>::Output

Performs the indexing (container[index]) operation. Read more
Sourceยง

impl<T, S> Index<Range<usize>> for IndexSet<T, S>

Sourceยง

type Output = Slice<T>

The returned type after indexing.
Sourceยง

fn index( &self, range: Range<usize>, ) -> &<IndexSet<T, S> as Index<Range<usize>>>::Output

Performs the indexing (container[index]) operation. Read more
Sourceยง

impl<K, V> Index<Range<usize>> for Slice<K, V>

Sourceยง

type Output = Slice<K, V>

The returned type after indexing.
Sourceยง

fn index(&self, range: Range<usize>) -> &Slice<K, V>

Performs the indexing (container[index]) operation. Read more
Sourceยง

impl<T> Index<Range<usize>> for Slice<T>

Sourceยง

type Output = Slice<T>

The returned type after indexing.
Sourceยง

fn index( &self, range: Range<usize>, ) -> &<Slice<T> as Index<Range<usize>>>::Output

Performs the indexing (container[index]) operation. Read more
Sourceยง

impl<T> Index<Range<usize>> for Stack<T>
where T: Clone,

Sourceยง

type Output = [T]

The returned type after indexing.
Sourceยง

fn index(&self, range: Range<usize>) -> &[T]

Performs the indexing (container[index]) operation. Read more
Sourceยง

impl Index<Range<usize>> for UninitSlice

Sourceยง

type Output = UninitSlice

The returned type after indexing.
Sourceยง

fn index(&self, index: Range<usize>) -> &UninitSlice

Performs the indexing (container[index]) operation. Read more
Sourceยง

impl IndexMut<Range<usize>> for BStr

Sourceยง

fn index_mut(&mut self, r: Range<usize>) -> &mut BStr

Performs the mutable indexing (container[index]) operation. Read more
Sourceยง

impl<K, V, S> IndexMut<Range<usize>> for IndexMap<K, V, S>

Sourceยง

fn index_mut( &mut self, range: Range<usize>, ) -> &mut <IndexMap<K, V, S> as Index<Range<usize>>>::Output

Performs the mutable indexing (container[index]) operation. Read more
Sourceยง

impl<K, V> IndexMut<Range<usize>> for Slice<K, V>

Sourceยง

fn index_mut(&mut self, range: Range<usize>) -> &mut Slice<K, V>

Performs the mutable indexing (container[index]) operation. Read more
Sourceยง

impl IndexMut<Range<usize>> for UninitSlice

Sourceยง

fn index_mut(&mut self, index: Range<usize>) -> &mut UninitSlice

Performs the mutable indexing (container[index]) operation. Read more
Sourceยง

impl<T> IntoParallelIterator for Range<T>

Implemented for ranges of all primitive integer types and char.

Sourceยง

type Item = <Iter<T> as ParallelIterator>::Item

The type of item that the parallel iterator will produce.
Sourceยง

type Iter = Iter<T>

The parallel iterator type that will be created.
Sourceยง

fn into_par_iter(self) -> <Range<T> as IntoParallelIterator>::Iter โ“˜

Converts self into a parallel iterator. Read more
1.0.0 ยท Sourceยง

impl<A> Iterator for Range<A>
where A: Step,

Sourceยง

type Item = A

The type of the elements being iterated over.
Sourceยง

fn next(&mut self) -> Option<A>

Advances the iterator and returns the next value. Read more
Sourceยง

fn size_hint(&self) -> (usize, Option<usize>)

Returns the bounds on the remaining length of the iterator. Read more
Sourceยง

fn count(self) -> usize

Consumes the iterator, counting the number of iterations and returning it. Read more
Sourceยง

fn nth(&mut self, n: usize) -> Option<A>

Returns the nth element of the iterator. Read more
Sourceยง

fn last(self) -> Option<A>

Consumes the iterator, returning the last element. Read more
Sourceยง

fn min(self) -> Option<A>
where A: Ord,

Returns the minimum element of an iterator. Read more
Sourceยง

fn max(self) -> Option<A>
where A: Ord,

Returns the maximum element of an iterator. Read more
Sourceยง

fn is_sorted(self) -> bool

Checks if the elements of this iterator are sorted. Read more
Sourceยง

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

๐Ÿ”ฌThis is a nightly-only experimental API. (iter_advance_by)
Advances the iterator by n elements. Read more
Sourceยง

fn next_chunk<const N: usize>( &mut self, ) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>
where Self: Sized,

๐Ÿ”ฌThis is a nightly-only experimental API. (iter_next_chunk)
Advances the iterator and returns an array containing the next N values. Read more
1.28.0 ยท Sourceยง

fn step_by(self, step: usize) -> StepBy<Self> โ“˜
where Self: Sized,

Creates an iterator starting at the same point, but stepping by the given amount at each iteration. Read more
1.0.0 ยท Sourceยง

fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter> โ“˜
where Self: Sized, U: IntoIterator<Item = Self::Item>,

Takes two iterators and creates a new iterator over both in sequence. Read more
1.0.0 ยท Sourceยง

fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter> โ“˜
where Self: Sized, U: IntoIterator,

โ€˜Zips upโ€™ two iterators into a single iterator of pairs. Read more
Sourceยง

fn intersperse(self, separator: Self::Item) -> Intersperse<Self> โ“˜
where Self: Sized, Self::Item: Clone,

๐Ÿ”ฌThis is a nightly-only experimental API. (iter_intersperse)
Creates a new iterator which places a copy of separator between adjacent items of the original iterator. Read more
Sourceยง

fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G> โ“˜
where Self: Sized, G: FnMut() -> Self::Item,

๐Ÿ”ฌThis is a nightly-only experimental API. (iter_intersperse)
Creates a new iterator which places an item generated by separator between adjacent items of the original iterator. Read more
1.0.0 ยท Sourceยง

fn map<B, F>(self, f: F) -> Map<Self, F> โ“˜
where Self: Sized, F: FnMut(Self::Item) -> B,

Takes a closure and creates an iterator which calls that closure on each element. Read more
1.21.0 ยท Sourceยง

fn for_each<F>(self, f: F)
where Self: Sized, F: FnMut(Self::Item),

Calls a closure on each element of an iterator. Read more
1.0.0 ยท Sourceยง

fn filter<P>(self, predicate: P) -> Filter<Self, P> โ“˜
where Self: Sized, P: FnMut(&Self::Item) -> bool,

Creates an iterator which uses a closure to determine if an element should be yielded. Read more
1.0.0 ยท Sourceยง

fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F> โ“˜
where Self: Sized, F: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both filters and maps. Read more
1.0.0 ยท Sourceยง

fn enumerate(self) -> Enumerate<Self> โ“˜
where Self: Sized,

Creates an iterator which gives the current iteration count as well as the next value. Read more
1.0.0 ยท Sourceยง

fn peekable(self) -> Peekable<Self> โ“˜
where Self: Sized,

Creates an iterator which can use the peek and peek_mut methods to look at the next element of the iterator without consuming it. See their documentation for more information. Read more
1.0.0 ยท Sourceยง

fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P> โ“˜
where Self: Sized, P: FnMut(&Self::Item) -> bool,

Creates an iterator that skips elements based on a predicate. Read more
1.0.0 ยท Sourceยง

fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P> โ“˜
where Self: Sized, P: FnMut(&Self::Item) -> bool,

Creates an iterator that yields elements based on a predicate. Read more
1.57.0 ยท Sourceยง

fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P> โ“˜
where Self: Sized, P: FnMut(Self::Item) -> Option<B>,

Creates an iterator that both yields elements based on a predicate and maps. Read more
1.0.0 ยท Sourceยง

fn skip(self, n: usize) -> Skip<Self> โ“˜
where Self: Sized,

Creates an iterator that skips the first n elements. Read more
1.0.0 ยท Sourceยง

fn take(self, n: usize) -> Take<Self> โ“˜
where Self: Sized,

Creates an iterator that yields the first n elements, or fewer if the underlying iterator ends sooner. Read more
1.0.0 ยท Sourceยง

fn scan<St, B, F>(self, initial_state: St, f: F) -> Scan<Self, St, F> โ“˜
where Self: Sized, F: FnMut(&mut St, Self::Item) -> Option<B>,

An iterator adapter which, like fold, holds internal state, but unlike fold, produces a new iterator. Read more
1.0.0 ยท Sourceยง

fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F> โ“˜
where Self: Sized, U: IntoIterator, F: FnMut(Self::Item) -> U,

Creates an iterator that works like map, but flattens nested structure. Read more
1.29.0 ยท Sourceยง

fn flatten(self) -> Flatten<Self> โ“˜
where Self: Sized, Self::Item: IntoIterator,

Creates an iterator that flattens nested structure. Read more
Sourceยง

fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N> โ“˜
where Self: Sized, F: FnMut(&[Self::Item; N]) -> R,

๐Ÿ”ฌThis is a nightly-only experimental API. (iter_map_windows)
Calls the given function f for each contiguous window of size N over self and returns an iterator over the outputs of f. Like slice::windows(), the windows during mapping overlap as well. Read more
1.0.0 ยท Sourceยง

fn fuse(self) -> Fuse<Self> โ“˜
where Self: Sized,

Creates an iterator which ends after the first None. Read more
1.0.0 ยท Sourceยง

fn inspect<F>(self, f: F) -> Inspect<Self, F> โ“˜
where Self: Sized, F: FnMut(&Self::Item),

Does something with each element of an iterator, passing the value on. Read more
1.0.0 ยท Sourceยง

fn by_ref(&mut self) -> &mut Self
where Self: Sized,

Borrows an iterator, rather than consuming it. Read more
1.0.0 ยท Sourceยง

fn collect<B>(self) -> B
where B: FromIterator<Self::Item>, Self: Sized,

Transforms an iterator into a collection. Read more
Sourceยง

fn try_collect<B>( &mut self, ) -> <<Self::Item as Try>::Residual as Residual<B>>::TryType
where Self: Sized, Self::Item: Try, <Self::Item as Try>::Residual: Residual<B>, B: FromIterator<<Self::Item as Try>::Output>,

๐Ÿ”ฌThis is a nightly-only experimental API. (iterator_try_collect)
Fallibly transforms an iterator into a collection, short circuiting if a failure is encountered. Read more
Sourceยง

fn collect_into<E>(self, collection: &mut E) -> &mut E
where E: Extend<Self::Item>, Self: Sized,

๐Ÿ”ฌThis is a nightly-only experimental API. (iter_collect_into)
Collects all the items from an iterator into a collection. Read more
1.0.0 ยท Sourceยง

fn partition<B, F>(self, f: F) -> (B, B)
where Self: Sized, B: Default + Extend<Self::Item>, F: FnMut(&Self::Item) -> bool,

Consumes an iterator, creating two collections from it. Read more
Sourceยง

fn partition_in_place<'a, T, P>(self, predicate: P) -> usize
where T: 'a, Self: Sized + DoubleEndedIterator<Item = &'a mut T>, P: FnMut(&T) -> bool,

๐Ÿ”ฌThis is a nightly-only experimental API. (iter_partition_in_place)
Reorders the elements of this iterator in-place according to the given predicate, such that all those that return true precede all those that return false. Returns the number of true elements found. Read more
Sourceยง

fn is_partitioned<P>(self, predicate: P) -> bool
where Self: Sized, P: FnMut(Self::Item) -> bool,

๐Ÿ”ฌThis is a nightly-only experimental API. (iter_is_partitioned)
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. Read more
1.27.0 ยท Sourceยง

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

An iterator method that applies a function as long as it returns successfully, producing a single, final value. Read more
1.27.0 ยท Sourceยง

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

An iterator method that applies a fallible function to each item in the iterator, stopping at the first error and returning that error. Read more
1.0.0 ยท Sourceยง

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

Folds every element into an accumulator by applying an operation, returning the final result. Read more
1.51.0 ยท Sourceยง

fn reduce<F>(self, f: F) -> Option<Self::Item>
where Self: Sized, F: FnMut(Self::Item, Self::Item) -> Self::Item,

Reduces the elements to a single one, by repeatedly applying a reducing operation. Read more
Sourceยง

fn try_reduce<R>( &mut self, f: impl FnMut(Self::Item, Self::Item) -> R, ) -> <<R as Try>::Residual as Residual<Option<<R as Try>::Output>>>::TryType
where Self: Sized, R: Try<Output = Self::Item>, <R as Try>::Residual: Residual<Option<Self::Item>>,

๐Ÿ”ฌThis is a nightly-only experimental API. (iterator_try_reduce)
Reduces the elements to a single one by repeatedly applying a reducing operation. If the closure returns a failure, the failure is propagated back to the caller immediately. Read more
1.0.0 ยท Sourceยง

fn all<F>(&mut self, f: F) -> bool
where Self: Sized, F: FnMut(Self::Item) -> bool,

Tests if every element of the iterator matches a predicate. Read more
1.0.0 ยท Sourceยง

fn any<F>(&mut self, f: F) -> bool
where Self: Sized, F: FnMut(Self::Item) -> bool,

Tests if any element of the iterator matches a predicate. Read more
1.0.0 ยท Sourceยง

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

Searches for an element of an iterator that satisfies a predicate. Read more
1.30.0 ยท Sourceยง

fn find_map<B, F>(&mut self, f: F) -> Option<B>
where Self: Sized, F: FnMut(Self::Item) -> Option<B>,

Applies function to the elements of iterator and returns the first non-none result. Read more
Sourceยง

fn try_find<R>( &mut self, f: impl FnMut(&Self::Item) -> R, ) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryType
where Self: Sized, R: Try<Output = bool>, <R as Try>::Residual: Residual<Option<Self::Item>>,

๐Ÿ”ฌThis is a nightly-only experimental API. (try_find)
Applies function to the elements of iterator and returns the first true result or the first error. Read more
1.0.0 ยท Sourceยง

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

Searches for an element in an iterator, returning its index. Read more
1.0.0 ยท Sourceยง

fn rposition<P>(&mut self, predicate: P) -> Option<usize>
where P: FnMut(Self::Item) -> bool, Self: Sized + ExactSizeIterator + DoubleEndedIterator,

Searches for an element in an iterator from the right, returning its index. Read more
1.6.0 ยท Sourceยง

fn max_by_key<B, F>(self, f: F) -> Option<Self::Item>
where B: Ord, Self: Sized, F: FnMut(&Self::Item) -> B,

Returns the element that gives the maximum value from the specified function. Read more
1.15.0 ยท Sourceยง

fn max_by<F>(self, compare: F) -> Option<Self::Item>
where Self: Sized, F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the maximum value with respect to the specified comparison function. Read more
1.6.0 ยท Sourceยง

fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>
where B: Ord, Self: Sized, F: FnMut(&Self::Item) -> B,

Returns the element that gives the minimum value from the specified function. Read more
1.15.0 ยท Sourceยง

fn min_by<F>(self, compare: F) -> Option<Self::Item>
where Self: Sized, F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Returns the element that gives the minimum value with respect to the specified comparison function. Read more
1.0.0 ยท Sourceยง

fn rev(self) -> Rev<Self> โ“˜
where Self: Sized + DoubleEndedIterator,

Reverses an iteratorโ€™s direction. Read more
1.0.0 ยท Sourceยง

fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
where FromA: Default + Extend<A>, FromB: Default + Extend<B>, Self: Sized + Iterator<Item = (A, B)>,

Converts an iterator of pairs into a pair of containers. Read more
1.36.0 ยท Sourceยง

fn copied<'a, T>(self) -> Copied<Self> โ“˜
where T: 'a + Copy, Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which copies all of its elements. Read more
1.0.0 ยท Sourceยง

fn cloned<'a, T>(self) -> Cloned<Self> โ“˜
where T: 'a + Clone, Self: Sized + Iterator<Item = &'a T>,

Creates an iterator which clones all of its elements. Read more
1.0.0 ยท Sourceยง

fn cycle(self) -> Cycle<Self> โ“˜
where Self: Sized + Clone,

Repeats an iterator endlessly. Read more
Sourceยง

fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N> โ“˜
where Self: Sized,

๐Ÿ”ฌThis is a nightly-only experimental API. (iter_array_chunks)
Returns an iterator over N elements of the iterator at a time. Read more
1.11.0 ยท Sourceยง

fn sum<S>(self) -> S
where Self: Sized, S: Sum<Self::Item>,

Sums the elements of an iterator. Read more
1.11.0 ยท Sourceยง

fn product<P>(self) -> P
where Self: Sized, P: Product<Self::Item>,

Iterates over the entire iterator, multiplying all the elements Read more
1.5.0 ยท Sourceยง

fn cmp<I>(self, other: I) -> Ordering
where I: IntoIterator<Item = Self::Item>, Self::Item: Ord, Self: Sized,

Lexicographically compares the elements of this Iterator with those of another. Read more
Sourceยง

fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
where Self: Sized, I: IntoIterator, F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Ordering,

๐Ÿ”ฌThis is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those of another with respect to the specified comparison function. Read more
1.5.0 ยท Sourceยง

fn partial_cmp<I>(self, other: I) -> Option<Ordering>
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, Self: Sized,

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. Read more
Sourceยง

fn partial_cmp_by<I, F>(self, other: I, partial_cmp: F) -> Option<Ordering>
where Self: Sized, I: IntoIterator, F: FnMut(Self::Item, <I as IntoIterator>::Item) -> Option<Ordering>,

๐Ÿ”ฌThis is a nightly-only experimental API. (iter_order_by)
Lexicographically compares the elements of this Iterator with those of another with respect to the specified comparison function. Read more
1.5.0 ยท Sourceยง

fn eq<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialEq<<I as IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are equal to those of another. Read more
Sourceยง

fn eq_by<I, F>(self, other: I, eq: F) -> bool
where Self: Sized, I: IntoIterator, F: FnMut(Self::Item, <I as IntoIterator>::Item) -> bool,

๐Ÿ”ฌThis is a nightly-only experimental API. (iter_order_by)
Determines if the elements of this Iterator are equal to those of another with respect to the specified equality function. Read more
1.5.0 ยท Sourceยง

fn ne<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialEq<<I as IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are not equal to those of another. Read more
1.5.0 ยท Sourceยง

fn lt<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are lexicographically less than those of another. Read more
1.5.0 ยท Sourceยง

fn le<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are lexicographically less or equal to those of another. Read more
1.5.0 ยท Sourceยง

fn gt<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are lexicographically greater than those of another. Read more
1.5.0 ยท Sourceยง

fn ge<I>(self, other: I) -> bool
where I: IntoIterator, Self::Item: PartialOrd<<I as IntoIterator>::Item>, Self: Sized,

Determines if the elements of this Iterator are lexicographically greater than or equal to those of another. Read more
1.82.0 ยท Sourceยง

fn is_sorted_by<F>(self, compare: F) -> bool
where Self: Sized, F: FnMut(&Self::Item, &Self::Item) -> bool,

Checks if the elements of this iterator are sorted using the given comparator function. Read more
1.82.0 ยท Sourceยง

fn is_sorted_by_key<F, K>(self, f: F) -> bool
where Self: Sized, F: FnMut(Self::Item) -> K, K: PartialOrd,

Checks if the elements of this iterator are sorted using the given key extraction function. Read more
Sourceยง

impl<I> IteratorIndex<I> for Range<usize>
where I: Iterator,

Sourceยง

type Output = Skip<Take<I>>

The type returned for this type of index.
Sourceยง

fn index(self, iter: I) -> <Range<usize> as IteratorIndex<I>>::Output โ“˜

Returns an adapted iterator for the current index. Read more
Sourceยง

impl<I> IteratorIndex<I> for Range<usize>
where I: Iterator,

Sourceยง

type Output = Skip<Take<I>>

The type returned for this type of index.
Sourceยง

fn index(self, iter: I) -> <Range<usize> as IteratorIndex<I>>::Output โ“˜

Returns an adapted iterator for the current index. Read more
Sourceยง

impl NomRange<usize> for Range<usize>

Sourceยง

type Saturating = Range<usize>

The saturating iterator type.
Sourceยง

type Bounded = Range<usize>

The bounded iterator type.
Sourceยง

fn bounds(&self) -> (Bound<usize>, Bound<usize>)

Returns the bounds of this range.
Sourceยง

fn contains(&self, item: &usize) -> bool

true if item is contained in the range.
Sourceยง

fn is_inverted(&self) -> bool

true if the range is inverted.
Sourceยง

fn saturating_iter(&self) -> <Range<usize> as NomRange<usize>>::Saturating โ“˜

Creates a saturating iterator. A saturating iterator counts the number of iterations starting from 0 up to the upper bound of this range. If the upper bound is infinite the iterator saturates at the largest representable value of its type and returns it for all further elements.
Sourceยง

fn bounded_iter(&self) -> <Range<usize> as NomRange<usize>>::Bounded โ“˜

Creates a bounded iterator. A bounded iterator counts the number of iterations starting from 0 up to the upper bound of this range. If the upper bounds is infinite the iterator counts up until the amount of iterations has reached the largest representable value of its type and then returns None for all further elements.
Sourceยง

impl PartialEq<Range<usize>> for Span

Sourceยง

fn eq(&self, range: &Range<usize>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 ยท Sourceยง

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Sourceยง

impl PartialEq<Range<usize>> for Span

Sourceยง

fn eq(&self, range: &Range<usize>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 ยท Sourceยง

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Sourceยง

impl PartialEq<Span> for Range<usize>

Sourceยง

fn eq(&self, span: &Span) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 ยท Sourceยง

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Sourceยง

impl PartialEq<Span> for Range<usize>

Sourceยง

fn eq(&self, span: &Span) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 ยท Sourceยง

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
1.0.0 ยท Sourceยง

impl<Idx> PartialEq for Range<Idx>
where Idx: PartialEq,

Sourceยง

fn eq(&self, other: &Range<Idx>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 ยท Sourceยง

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
1.28.0 ยท Sourceยง

impl<T> RangeBounds<T> for Range<&T>

Sourceยง

fn start_bound(&self) -> Bound<&T>

Start index bound. Read more
Sourceยง

fn end_bound(&self) -> Bound<&T>

End index bound. Read more
1.35.0 ยท Sourceยง

fn contains<U>(&self, item: &U) -> bool
where T: PartialOrd<U>, U: PartialOrd<T> + ?Sized,

Returns true if item is contained in the range. Read more
1.28.0 ยท Sourceยง

impl<T> RangeBounds<T> for Range<T>

Sourceยง

fn start_bound(&self) -> Bound<&T>

Start index bound. Read more
Sourceยง

fn end_bound(&self) -> Bound<&T>

End index bound. Read more
1.35.0 ยท Sourceยง

fn contains<U>(&self, item: &U) -> bool
where T: PartialOrd<U>, U: PartialOrd<T> + ?Sized,

Returns true if item is contained in the range. Read more
Sourceยง

impl RangeExt for Range<usize>

Sourceยง

impl<T> SampleRange<T> for Range<T>

Sourceยง

fn sample_single<R>(self, rng: &mut R) -> T
where R: RngCore + ?Sized,

Generate a sample from the given range.
Sourceยง

fn is_empty(&self) -> bool

Check whether the range is empty.
Sourceยง

impl<T> SampleRange<T> for Range<T>

Sourceยง

fn sample_single<R>(self, rng: &mut R) -> Result<T, Error>
where R: RngCore + ?Sized,

Generate a sample from the given range.
Sourceยง

fn is_empty(&self) -> bool

Check whether the range is empty.
Sourceยง

impl<Idx> Serialize for Range<Idx>
where Idx: Serialize,

Sourceยง

fn serialize<S>( &self, serializer: S, ) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Sourceยง

impl<'a, T> Slice<Range<usize>> for &'a [T]

Sourceยง

fn slice(&self, range: Range<usize>) -> &'a [T]

Slices self according to the range argument
Sourceยง

impl<'a> Slice<Range<usize>> for &'a str

Sourceยง

fn slice(&self, range: Range<usize>) -> &'a str

Slices self according to the range argument
1.15.0 ยท Sourceยง

impl<T> SliceIndex<[T]> for Range<usize>

The methods index and index_mut panic if:

  • the start of the range is greater than the end of the range or
  • the end of the range is out of bounds.
Sourceยง

type Output = [T]

The output type returned by methods.
Sourceยง

fn get(self, slice: &[T]) -> Option<&[T]>

๐Ÿ”ฌThis is a nightly-only experimental API. (slice_index_methods)
Returns a shared reference to the output at this location, if in bounds.
Sourceยง

fn get_mut(self, slice: &mut [T]) -> Option<&mut [T]>

๐Ÿ”ฌThis is a nightly-only experimental API. (slice_index_methods)
Returns a mutable reference to the output at this location, if in bounds.
Sourceยง

unsafe fn get_unchecked(self, slice: *const [T]) -> *const [T]

๐Ÿ”ฌThis is a nightly-only experimental API. (slice_index_methods)
Returns a pointer to the output at this location, without performing any bounds checking. Read more
Sourceยง

unsafe fn get_unchecked_mut(self, slice: *mut [T]) -> *mut [T]

๐Ÿ”ฌThis is a nightly-only experimental API. (slice_index_methods)
Returns a mutable pointer to the output at this location, without performing any bounds checking. Read more
Sourceยง

fn index(self, slice: &[T]) -> &[T]

๐Ÿ”ฌThis is a nightly-only experimental API. (slice_index_methods)
Returns a shared reference to the output at this location, panicking if out of bounds.
Sourceยง

fn index_mut(self, slice: &mut [T]) -> &mut [T]

๐Ÿ”ฌThis is a nightly-only experimental API. (slice_index_methods)
Returns a mutable reference to the output at this location, panicking if out of bounds.
1.20.0 ยท Sourceยง

impl SliceIndex<str> for Range<usize>

Implements substring slicing with syntax &self[begin .. end] or &mut self[begin .. end].

Returns a slice of the given string from the byte range [begin, end).

This operation is O(1).

Prior to 1.20.0, these indexing operations were still supported by direct implementation of Index and IndexMut.

ยงPanics

Panics if begin or end does not point to the starting byte offset of a character (as defined by is_char_boundary), if begin > end, or if end > len.

ยงExamples

let s = "Lรถwe ่€่™Ž Lรฉopard";
assert_eq!(&s[0 .. 1], "L");

assert_eq!(&s[1 .. 9], "รถwe ่€");

// these will panic:
// byte 2 lies within `รถ`:
// &s[2 ..3];

// byte 8 lies within `่€`
// &s[1 .. 8];

// byte 100 is outside the string
// &s[3 .. 100];
Sourceยง

type Output = str

The output type returned by methods.
Sourceยง

fn get(self, slice: &str) -> Option<&<Range<usize> as SliceIndex<str>>::Output>

๐Ÿ”ฌThis is a nightly-only experimental API. (slice_index_methods)
Returns a shared reference to the output at this location, if in bounds.
Sourceยง

fn get_mut( self, slice: &mut str, ) -> Option<&mut <Range<usize> as SliceIndex<str>>::Output>

๐Ÿ”ฌThis is a nightly-only experimental API. (slice_index_methods)
Returns a mutable reference to the output at this location, if in bounds.
Sourceยง

unsafe fn get_unchecked( self, slice: *const str, ) -> *const <Range<usize> as SliceIndex<str>>::Output

๐Ÿ”ฌThis is a nightly-only experimental API. (slice_index_methods)
Returns a pointer to the output at this location, without performing any bounds checking. Read more
Sourceยง

unsafe fn get_unchecked_mut( self, slice: *mut str, ) -> *mut <Range<usize> as SliceIndex<str>>::Output

๐Ÿ”ฌThis is a nightly-only experimental API. (slice_index_methods)
Returns a mutable pointer to the output at this location, without performing any bounds checking. Read more
Sourceยง

fn index(self, slice: &str) -> &<Range<usize> as SliceIndex<str>>::Output โ“˜

๐Ÿ”ฌThis is a nightly-only experimental API. (slice_index_methods)
Returns a shared reference to the output at this location, panicking if out of bounds.
Sourceยง

fn index_mut( self, slice: &mut str, ) -> &mut <Range<usize> as SliceIndex<str>>::Output โ“˜

๐Ÿ”ฌThis is a nightly-only experimental API. (slice_index_methods)
Returns a mutable reference to the output at this location, panicking if out of bounds.
Sourceยง

impl Strategy for Range<f32>

Sourceยง

type Tree = BinarySearch

The value tree generated by this Strategy.
Sourceยง

type Value = f32

The type of value used by functions under test generated by this Strategy. Read more
Sourceยง

fn new_tree( &self, runner: &mut TestRunner, ) -> Result<<Range<f32> as Strategy>::Tree, Reason>

Generate a new value tree from the given runner. Read more
Sourceยง

fn prop_map<O, F>(self, fun: F) -> Map<Self, F>
where O: Debug, F: Fn(Self::Value) -> O, Self: Sized,

Returns a strategy which produces values transformed by the function fun. Read more
Sourceยง

fn prop_map_into<O>(self) -> MapInto<Self, O>
where O: Debug, Self: Sized, Self::Value: Into<O>,

Returns a strategy which produces values of type O by transforming Self with Into<O>. Read more
Sourceยง

fn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
where O: Debug, F: Fn(Self::Value, TestRng) -> O, Self: Sized,

Returns a strategy which produces values transformed by the function fun, which is additionally given a random number generator. Read more
Sourceยง

fn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Maps values produced by this strategy into new strategies and picks values from those strategies. Read more
Sourceยง

fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Maps values produced by this strategy into new strategies and picks values from those strategies while considering the new strategies to be independent. Read more
Sourceยง

fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Similar to prop_ind_flat_map(), but produces 2-tuples with the input generated from self in slot 0 and the derived strategy in slot 1. Read more
Sourceยง

fn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
where R: Into<Reason>, F: Fn(&Self::Value) -> bool, Self: Sized,

Returns a strategy which only produces values accepted by fun. Read more
Sourceยง

fn prop_filter_map<F, O>( self, whence: impl Into<Reason>, fun: F, ) -> FilterMap<Self, F>
where F: Fn(Self::Value) -> Option<O>, O: Debug, Self: Sized,

Returns a strategy which only produces transformed values where fun returns Some(value) and rejects those where fun returns None. Read more
Sourceยง

fn prop_union(self, other: Self) -> Union<Self>
where Self: Sized,

Returns a strategy which picks uniformly from self and other. Read more
Sourceยง

fn prop_recursive<R, F>( self, depth: u32, desired_size: u32, expected_branch_size: u32, recurse: F, ) -> Recursive<Self::Value, F>
where R: Strategy<Value = Self::Value> + 'static, F: Fn(BoxedStrategy<Self::Value>) -> R, Self: Sized + 'static,

Generate a recursive structure with self items as leaves. Read more
Sourceยง

fn prop_shuffle(self) -> Shuffle<Self>
where Self: Sized, Self::Value: Shuffleable,

Shuffle the contents of the values produced by this strategy. Read more
Sourceยง

fn boxed(self) -> BoxedStrategy<Self::Value>
where Self: Sized + 'static,

Erases the type of this Strategy so it can be passed around as a simple trait object. Read more
Sourceยง

fn sboxed(self) -> SBoxedStrategy<Self::Value>
where Self: Sized + Send + Sync + 'static,

Erases the type of this Strategy so it can be passed around as a simple trait object. Read more
Sourceยง

fn no_shrink(self) -> NoShrink<Self>
where Self: Sized,

Wraps this strategy to prevent values from being subject to shrinking. Read more
Sourceยง

impl Strategy for Range<f64>

Sourceยง

type Tree = BinarySearch

The value tree generated by this Strategy.
Sourceยง

type Value = f64

The type of value used by functions under test generated by this Strategy. Read more
Sourceยง

fn new_tree( &self, runner: &mut TestRunner, ) -> Result<<Range<f64> as Strategy>::Tree, Reason>

Generate a new value tree from the given runner. Read more
Sourceยง

fn prop_map<O, F>(self, fun: F) -> Map<Self, F>
where O: Debug, F: Fn(Self::Value) -> O, Self: Sized,

Returns a strategy which produces values transformed by the function fun. Read more
Sourceยง

fn prop_map_into<O>(self) -> MapInto<Self, O>
where O: Debug, Self: Sized, Self::Value: Into<O>,

Returns a strategy which produces values of type O by transforming Self with Into<O>. Read more
Sourceยง

fn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
where O: Debug, F: Fn(Self::Value, TestRng) -> O, Self: Sized,

Returns a strategy which produces values transformed by the function fun, which is additionally given a random number generator. Read more
Sourceยง

fn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Maps values produced by this strategy into new strategies and picks values from those strategies. Read more
Sourceยง

fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Maps values produced by this strategy into new strategies and picks values from those strategies while considering the new strategies to be independent. Read more
Sourceยง

fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Similar to prop_ind_flat_map(), but produces 2-tuples with the input generated from self in slot 0 and the derived strategy in slot 1. Read more
Sourceยง

fn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
where R: Into<Reason>, F: Fn(&Self::Value) -> bool, Self: Sized,

Returns a strategy which only produces values accepted by fun. Read more
Sourceยง

fn prop_filter_map<F, O>( self, whence: impl Into<Reason>, fun: F, ) -> FilterMap<Self, F>
where F: Fn(Self::Value) -> Option<O>, O: Debug, Self: Sized,

Returns a strategy which only produces transformed values where fun returns Some(value) and rejects those where fun returns None. Read more
Sourceยง

fn prop_union(self, other: Self) -> Union<Self>
where Self: Sized,

Returns a strategy which picks uniformly from self and other. Read more
Sourceยง

fn prop_recursive<R, F>( self, depth: u32, desired_size: u32, expected_branch_size: u32, recurse: F, ) -> Recursive<Self::Value, F>
where R: Strategy<Value = Self::Value> + 'static, F: Fn(BoxedStrategy<Self::Value>) -> R, Self: Sized + 'static,

Generate a recursive structure with self items as leaves. Read more
Sourceยง

fn prop_shuffle(self) -> Shuffle<Self>
where Self: Sized, Self::Value: Shuffleable,

Shuffle the contents of the values produced by this strategy. Read more
Sourceยง

fn boxed(self) -> BoxedStrategy<Self::Value>
where Self: Sized + 'static,

Erases the type of this Strategy so it can be passed around as a simple trait object. Read more
Sourceยง

fn sboxed(self) -> SBoxedStrategy<Self::Value>
where Self: Sized + Send + Sync + 'static,

Erases the type of this Strategy so it can be passed around as a simple trait object. Read more
Sourceยง

fn no_shrink(self) -> NoShrink<Self>
where Self: Sized,

Wraps this strategy to prevent values from being subject to shrinking. Read more
Sourceยง

impl Strategy for Range<i128>

Sourceยง

type Tree = BinarySearch

The value tree generated by this Strategy.
Sourceยง

type Value = i128

The type of value used by functions under test generated by this Strategy. Read more
Sourceยง

fn new_tree( &self, runner: &mut TestRunner, ) -> Result<<Range<i128> as Strategy>::Tree, Reason>

Generate a new value tree from the given runner. Read more
Sourceยง

fn prop_map<O, F>(self, fun: F) -> Map<Self, F>
where O: Debug, F: Fn(Self::Value) -> O, Self: Sized,

Returns a strategy which produces values transformed by the function fun. Read more
Sourceยง

fn prop_map_into<O>(self) -> MapInto<Self, O>
where O: Debug, Self: Sized, Self::Value: Into<O>,

Returns a strategy which produces values of type O by transforming Self with Into<O>. Read more
Sourceยง

fn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
where O: Debug, F: Fn(Self::Value, TestRng) -> O, Self: Sized,

Returns a strategy which produces values transformed by the function fun, which is additionally given a random number generator. Read more
Sourceยง

fn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Maps values produced by this strategy into new strategies and picks values from those strategies. Read more
Sourceยง

fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Maps values produced by this strategy into new strategies and picks values from those strategies while considering the new strategies to be independent. Read more
Sourceยง

fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Similar to prop_ind_flat_map(), but produces 2-tuples with the input generated from self in slot 0 and the derived strategy in slot 1. Read more
Sourceยง

fn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
where R: Into<Reason>, F: Fn(&Self::Value) -> bool, Self: Sized,

Returns a strategy which only produces values accepted by fun. Read more
Sourceยง

fn prop_filter_map<F, O>( self, whence: impl Into<Reason>, fun: F, ) -> FilterMap<Self, F>
where F: Fn(Self::Value) -> Option<O>, O: Debug, Self: Sized,

Returns a strategy which only produces transformed values where fun returns Some(value) and rejects those where fun returns None. Read more
Sourceยง

fn prop_union(self, other: Self) -> Union<Self>
where Self: Sized,

Returns a strategy which picks uniformly from self and other. Read more
Sourceยง

fn prop_recursive<R, F>( self, depth: u32, desired_size: u32, expected_branch_size: u32, recurse: F, ) -> Recursive<Self::Value, F>
where R: Strategy<Value = Self::Value> + 'static, F: Fn(BoxedStrategy<Self::Value>) -> R, Self: Sized + 'static,

Generate a recursive structure with self items as leaves. Read more
Sourceยง

fn prop_shuffle(self) -> Shuffle<Self>
where Self: Sized, Self::Value: Shuffleable,

Shuffle the contents of the values produced by this strategy. Read more
Sourceยง

fn boxed(self) -> BoxedStrategy<Self::Value>
where Self: Sized + 'static,

Erases the type of this Strategy so it can be passed around as a simple trait object. Read more
Sourceยง

fn sboxed(self) -> SBoxedStrategy<Self::Value>
where Self: Sized + Send + Sync + 'static,

Erases the type of this Strategy so it can be passed around as a simple trait object. Read more
Sourceยง

fn no_shrink(self) -> NoShrink<Self>
where Self: Sized,

Wraps this strategy to prevent values from being subject to shrinking. Read more
Sourceยง

impl Strategy for Range<i16>

Sourceยง

type Tree = BinarySearch

The value tree generated by this Strategy.
Sourceยง

type Value = i16

The type of value used by functions under test generated by this Strategy. Read more
Sourceยง

fn new_tree( &self, runner: &mut TestRunner, ) -> Result<<Range<i16> as Strategy>::Tree, Reason>

Generate a new value tree from the given runner. Read more
Sourceยง

fn prop_map<O, F>(self, fun: F) -> Map<Self, F>
where O: Debug, F: Fn(Self::Value) -> O, Self: Sized,

Returns a strategy which produces values transformed by the function fun. Read more
Sourceยง

fn prop_map_into<O>(self) -> MapInto<Self, O>
where O: Debug, Self: Sized, Self::Value: Into<O>,

Returns a strategy which produces values of type O by transforming Self with Into<O>. Read more
Sourceยง

fn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
where O: Debug, F: Fn(Self::Value, TestRng) -> O, Self: Sized,

Returns a strategy which produces values transformed by the function fun, which is additionally given a random number generator. Read more
Sourceยง

fn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Maps values produced by this strategy into new strategies and picks values from those strategies. Read more
Sourceยง

fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Maps values produced by this strategy into new strategies and picks values from those strategies while considering the new strategies to be independent. Read more
Sourceยง

fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Similar to prop_ind_flat_map(), but produces 2-tuples with the input generated from self in slot 0 and the derived strategy in slot 1. Read more
Sourceยง

fn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
where R: Into<Reason>, F: Fn(&Self::Value) -> bool, Self: Sized,

Returns a strategy which only produces values accepted by fun. Read more
Sourceยง

fn prop_filter_map<F, O>( self, whence: impl Into<Reason>, fun: F, ) -> FilterMap<Self, F>
where F: Fn(Self::Value) -> Option<O>, O: Debug, Self: Sized,

Returns a strategy which only produces transformed values where fun returns Some(value) and rejects those where fun returns None. Read more
Sourceยง

fn prop_union(self, other: Self) -> Union<Self>
where Self: Sized,

Returns a strategy which picks uniformly from self and other. Read more
Sourceยง

fn prop_recursive<R, F>( self, depth: u32, desired_size: u32, expected_branch_size: u32, recurse: F, ) -> Recursive<Self::Value, F>
where R: Strategy<Value = Self::Value> + 'static, F: Fn(BoxedStrategy<Self::Value>) -> R, Self: Sized + 'static,

Generate a recursive structure with self items as leaves. Read more
Sourceยง

fn prop_shuffle(self) -> Shuffle<Self>
where Self: Sized, Self::Value: Shuffleable,

Shuffle the contents of the values produced by this strategy. Read more
Sourceยง

fn boxed(self) -> BoxedStrategy<Self::Value>
where Self: Sized + 'static,

Erases the type of this Strategy so it can be passed around as a simple trait object. Read more
Sourceยง

fn sboxed(self) -> SBoxedStrategy<Self::Value>
where Self: Sized + Send + Sync + 'static,

Erases the type of this Strategy so it can be passed around as a simple trait object. Read more
Sourceยง

fn no_shrink(self) -> NoShrink<Self>
where Self: Sized,

Wraps this strategy to prevent values from being subject to shrinking. Read more
Sourceยง

impl Strategy for Range<i32>

Sourceยง

type Tree = BinarySearch

The value tree generated by this Strategy.
Sourceยง

type Value = i32

The type of value used by functions under test generated by this Strategy. Read more
Sourceยง

fn new_tree( &self, runner: &mut TestRunner, ) -> Result<<Range<i32> as Strategy>::Tree, Reason>

Generate a new value tree from the given runner. Read more
Sourceยง

fn prop_map<O, F>(self, fun: F) -> Map<Self, F>
where O: Debug, F: Fn(Self::Value) -> O, Self: Sized,

Returns a strategy which produces values transformed by the function fun. Read more
Sourceยง

fn prop_map_into<O>(self) -> MapInto<Self, O>
where O: Debug, Self: Sized, Self::Value: Into<O>,

Returns a strategy which produces values of type O by transforming Self with Into<O>. Read more
Sourceยง

fn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
where O: Debug, F: Fn(Self::Value, TestRng) -> O, Self: Sized,

Returns a strategy which produces values transformed by the function fun, which is additionally given a random number generator. Read more
Sourceยง

fn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Maps values produced by this strategy into new strategies and picks values from those strategies. Read more
Sourceยง

fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Maps values produced by this strategy into new strategies and picks values from those strategies while considering the new strategies to be independent. Read more
Sourceยง

fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Similar to prop_ind_flat_map(), but produces 2-tuples with the input generated from self in slot 0 and the derived strategy in slot 1. Read more
Sourceยง

fn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
where R: Into<Reason>, F: Fn(&Self::Value) -> bool, Self: Sized,

Returns a strategy which only produces values accepted by fun. Read more
Sourceยง

fn prop_filter_map<F, O>( self, whence: impl Into<Reason>, fun: F, ) -> FilterMap<Self, F>
where F: Fn(Self::Value) -> Option<O>, O: Debug, Self: Sized,

Returns a strategy which only produces transformed values where fun returns Some(value) and rejects those where fun returns None. Read more
Sourceยง

fn prop_union(self, other: Self) -> Union<Self>
where Self: Sized,

Returns a strategy which picks uniformly from self and other. Read more
Sourceยง

fn prop_recursive<R, F>( self, depth: u32, desired_size: u32, expected_branch_size: u32, recurse: F, ) -> Recursive<Self::Value, F>
where R: Strategy<Value = Self::Value> + 'static, F: Fn(BoxedStrategy<Self::Value>) -> R, Self: Sized + 'static,

Generate a recursive structure with self items as leaves. Read more
Sourceยง

fn prop_shuffle(self) -> Shuffle<Self>
where Self: Sized, Self::Value: Shuffleable,

Shuffle the contents of the values produced by this strategy. Read more
Sourceยง

fn boxed(self) -> BoxedStrategy<Self::Value>
where Self: Sized + 'static,

Erases the type of this Strategy so it can be passed around as a simple trait object. Read more
Sourceยง

fn sboxed(self) -> SBoxedStrategy<Self::Value>
where Self: Sized + Send + Sync + 'static,

Erases the type of this Strategy so it can be passed around as a simple trait object. Read more
Sourceยง

fn no_shrink(self) -> NoShrink<Self>
where Self: Sized,

Wraps this strategy to prevent values from being subject to shrinking. Read more
Sourceยง

impl Strategy for Range<i64>

Sourceยง

type Tree = BinarySearch

The value tree generated by this Strategy.
Sourceยง

type Value = i64

The type of value used by functions under test generated by this Strategy. Read more
Sourceยง

fn new_tree( &self, runner: &mut TestRunner, ) -> Result<<Range<i64> as Strategy>::Tree, Reason>

Generate a new value tree from the given runner. Read more
Sourceยง

fn prop_map<O, F>(self, fun: F) -> Map<Self, F>
where O: Debug, F: Fn(Self::Value) -> O, Self: Sized,

Returns a strategy which produces values transformed by the function fun. Read more
Sourceยง

fn prop_map_into<O>(self) -> MapInto<Self, O>
where O: Debug, Self: Sized, Self::Value: Into<O>,

Returns a strategy which produces values of type O by transforming Self with Into<O>. Read more
Sourceยง

fn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
where O: Debug, F: Fn(Self::Value, TestRng) -> O, Self: Sized,

Returns a strategy which produces values transformed by the function fun, which is additionally given a random number generator. Read more
Sourceยง

fn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Maps values produced by this strategy into new strategies and picks values from those strategies. Read more
Sourceยง

fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Maps values produced by this strategy into new strategies and picks values from those strategies while considering the new strategies to be independent. Read more
Sourceยง

fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Similar to prop_ind_flat_map(), but produces 2-tuples with the input generated from self in slot 0 and the derived strategy in slot 1. Read more
Sourceยง

fn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
where R: Into<Reason>, F: Fn(&Self::Value) -> bool, Self: Sized,

Returns a strategy which only produces values accepted by fun. Read more
Sourceยง

fn prop_filter_map<F, O>( self, whence: impl Into<Reason>, fun: F, ) -> FilterMap<Self, F>
where F: Fn(Self::Value) -> Option<O>, O: Debug, Self: Sized,

Returns a strategy which only produces transformed values where fun returns Some(value) and rejects those where fun returns None. Read more
Sourceยง

fn prop_union(self, other: Self) -> Union<Self>
where Self: Sized,

Returns a strategy which picks uniformly from self and other. Read more
Sourceยง

fn prop_recursive<R, F>( self, depth: u32, desired_size: u32, expected_branch_size: u32, recurse: F, ) -> Recursive<Self::Value, F>
where R: Strategy<Value = Self::Value> + 'static, F: Fn(BoxedStrategy<Self::Value>) -> R, Self: Sized + 'static,

Generate a recursive structure with self items as leaves. Read more
Sourceยง

fn prop_shuffle(self) -> Shuffle<Self>
where Self: Sized, Self::Value: Shuffleable,

Shuffle the contents of the values produced by this strategy. Read more
Sourceยง

fn boxed(self) -> BoxedStrategy<Self::Value>
where Self: Sized + 'static,

Erases the type of this Strategy so it can be passed around as a simple trait object. Read more
Sourceยง

fn sboxed(self) -> SBoxedStrategy<Self::Value>
where Self: Sized + Send + Sync + 'static,

Erases the type of this Strategy so it can be passed around as a simple trait object. Read more
Sourceยง

fn no_shrink(self) -> NoShrink<Self>
where Self: Sized,

Wraps this strategy to prevent values from being subject to shrinking. Read more
Sourceยง

impl Strategy for Range<i8>

Sourceยง

type Tree = BinarySearch

The value tree generated by this Strategy.
Sourceยง

type Value = i8

The type of value used by functions under test generated by this Strategy. Read more
Sourceยง

fn new_tree( &self, runner: &mut TestRunner, ) -> Result<<Range<i8> as Strategy>::Tree, Reason>

Generate a new value tree from the given runner. Read more
Sourceยง

fn prop_map<O, F>(self, fun: F) -> Map<Self, F>
where O: Debug, F: Fn(Self::Value) -> O, Self: Sized,

Returns a strategy which produces values transformed by the function fun. Read more
Sourceยง

fn prop_map_into<O>(self) -> MapInto<Self, O>
where O: Debug, Self: Sized, Self::Value: Into<O>,

Returns a strategy which produces values of type O by transforming Self with Into<O>. Read more
Sourceยง

fn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
where O: Debug, F: Fn(Self::Value, TestRng) -> O, Self: Sized,

Returns a strategy which produces values transformed by the function fun, which is additionally given a random number generator. Read more
Sourceยง

fn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Maps values produced by this strategy into new strategies and picks values from those strategies. Read more
Sourceยง

fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Maps values produced by this strategy into new strategies and picks values from those strategies while considering the new strategies to be independent. Read more
Sourceยง

fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Similar to prop_ind_flat_map(), but produces 2-tuples with the input generated from self in slot 0 and the derived strategy in slot 1. Read more
Sourceยง

fn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
where R: Into<Reason>, F: Fn(&Self::Value) -> bool, Self: Sized,

Returns a strategy which only produces values accepted by fun. Read more
Sourceยง

fn prop_filter_map<F, O>( self, whence: impl Into<Reason>, fun: F, ) -> FilterMap<Self, F>
where F: Fn(Self::Value) -> Option<O>, O: Debug, Self: Sized,

Returns a strategy which only produces transformed values where fun returns Some(value) and rejects those where fun returns None. Read more
Sourceยง

fn prop_union(self, other: Self) -> Union<Self>
where Self: Sized,

Returns a strategy which picks uniformly from self and other. Read more
Sourceยง

fn prop_recursive<R, F>( self, depth: u32, desired_size: u32, expected_branch_size: u32, recurse: F, ) -> Recursive<Self::Value, F>
where R: Strategy<Value = Self::Value> + 'static, F: Fn(BoxedStrategy<Self::Value>) -> R, Self: Sized + 'static,

Generate a recursive structure with self items as leaves. Read more
Sourceยง

fn prop_shuffle(self) -> Shuffle<Self>
where Self: Sized, Self::Value: Shuffleable,

Shuffle the contents of the values produced by this strategy. Read more
Sourceยง

fn boxed(self) -> BoxedStrategy<Self::Value>
where Self: Sized + 'static,

Erases the type of this Strategy so it can be passed around as a simple trait object. Read more
Sourceยง

fn sboxed(self) -> SBoxedStrategy<Self::Value>
where Self: Sized + Send + Sync + 'static,

Erases the type of this Strategy so it can be passed around as a simple trait object. Read more
Sourceยง

fn no_shrink(self) -> NoShrink<Self>
where Self: Sized,

Wraps this strategy to prevent values from being subject to shrinking. Read more
Sourceยง

impl Strategy for Range<isize>

Sourceยง

type Tree = BinarySearch

The value tree generated by this Strategy.
Sourceยง

type Value = isize

The type of value used by functions under test generated by this Strategy. Read more
Sourceยง

fn new_tree( &self, runner: &mut TestRunner, ) -> Result<<Range<isize> as Strategy>::Tree, Reason>

Generate a new value tree from the given runner. Read more
Sourceยง

fn prop_map<O, F>(self, fun: F) -> Map<Self, F>
where O: Debug, F: Fn(Self::Value) -> O, Self: Sized,

Returns a strategy which produces values transformed by the function fun. Read more
Sourceยง

fn prop_map_into<O>(self) -> MapInto<Self, O>
where O: Debug, Self: Sized, Self::Value: Into<O>,

Returns a strategy which produces values of type O by transforming Self with Into<O>. Read more
Sourceยง

fn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
where O: Debug, F: Fn(Self::Value, TestRng) -> O, Self: Sized,

Returns a strategy which produces values transformed by the function fun, which is additionally given a random number generator. Read more
Sourceยง

fn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Maps values produced by this strategy into new strategies and picks values from those strategies. Read more
Sourceยง

fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Maps values produced by this strategy into new strategies and picks values from those strategies while considering the new strategies to be independent. Read more
Sourceยง

fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Similar to prop_ind_flat_map(), but produces 2-tuples with the input generated from self in slot 0 and the derived strategy in slot 1. Read more
Sourceยง

fn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
where R: Into<Reason>, F: Fn(&Self::Value) -> bool, Self: Sized,

Returns a strategy which only produces values accepted by fun. Read more
Sourceยง

fn prop_filter_map<F, O>( self, whence: impl Into<Reason>, fun: F, ) -> FilterMap<Self, F>
where F: Fn(Self::Value) -> Option<O>, O: Debug, Self: Sized,

Returns a strategy which only produces transformed values where fun returns Some(value) and rejects those where fun returns None. Read more
Sourceยง

fn prop_union(self, other: Self) -> Union<Self>
where Self: Sized,

Returns a strategy which picks uniformly from self and other. Read more
Sourceยง

fn prop_recursive<R, F>( self, depth: u32, desired_size: u32, expected_branch_size: u32, recurse: F, ) -> Recursive<Self::Value, F>
where R: Strategy<Value = Self::Value> + 'static, F: Fn(BoxedStrategy<Self::Value>) -> R, Self: Sized + 'static,

Generate a recursive structure with self items as leaves. Read more
Sourceยง

fn prop_shuffle(self) -> Shuffle<Self>
where Self: Sized, Self::Value: Shuffleable,

Shuffle the contents of the values produced by this strategy. Read more
Sourceยง

fn boxed(self) -> BoxedStrategy<Self::Value>
where Self: Sized + 'static,

Erases the type of this Strategy so it can be passed around as a simple trait object. Read more
Sourceยง

fn sboxed(self) -> SBoxedStrategy<Self::Value>
where Self: Sized + Send + Sync + 'static,

Erases the type of this Strategy so it can be passed around as a simple trait object. Read more
Sourceยง

fn no_shrink(self) -> NoShrink<Self>
where Self: Sized,

Wraps this strategy to prevent values from being subject to shrinking. Read more
Sourceยง

impl Strategy for Range<u128>

Sourceยง

type Tree = BinarySearch

The value tree generated by this Strategy.
Sourceยง

type Value = u128

The type of value used by functions under test generated by this Strategy. Read more
Sourceยง

fn new_tree( &self, runner: &mut TestRunner, ) -> Result<<Range<u128> as Strategy>::Tree, Reason>

Generate a new value tree from the given runner. Read more
Sourceยง

fn prop_map<O, F>(self, fun: F) -> Map<Self, F>
where O: Debug, F: Fn(Self::Value) -> O, Self: Sized,

Returns a strategy which produces values transformed by the function fun. Read more
Sourceยง

fn prop_map_into<O>(self) -> MapInto<Self, O>
where O: Debug, Self: Sized, Self::Value: Into<O>,

Returns a strategy which produces values of type O by transforming Self with Into<O>. Read more
Sourceยง

fn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
where O: Debug, F: Fn(Self::Value, TestRng) -> O, Self: Sized,

Returns a strategy which produces values transformed by the function fun, which is additionally given a random number generator. Read more
Sourceยง

fn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Maps values produced by this strategy into new strategies and picks values from those strategies. Read more
Sourceยง

fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Maps values produced by this strategy into new strategies and picks values from those strategies while considering the new strategies to be independent. Read more
Sourceยง

fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Similar to prop_ind_flat_map(), but produces 2-tuples with the input generated from self in slot 0 and the derived strategy in slot 1. Read more
Sourceยง

fn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
where R: Into<Reason>, F: Fn(&Self::Value) -> bool, Self: Sized,

Returns a strategy which only produces values accepted by fun. Read more
Sourceยง

fn prop_filter_map<F, O>( self, whence: impl Into<Reason>, fun: F, ) -> FilterMap<Self, F>
where F: Fn(Self::Value) -> Option<O>, O: Debug, Self: Sized,

Returns a strategy which only produces transformed values where fun returns Some(value) and rejects those where fun returns None. Read more
Sourceยง

fn prop_union(self, other: Self) -> Union<Self>
where Self: Sized,

Returns a strategy which picks uniformly from self and other. Read more
Sourceยง

fn prop_recursive<R, F>( self, depth: u32, desired_size: u32, expected_branch_size: u32, recurse: F, ) -> Recursive<Self::Value, F>
where R: Strategy<Value = Self::Value> + 'static, F: Fn(BoxedStrategy<Self::Value>) -> R, Self: Sized + 'static,

Generate a recursive structure with self items as leaves. Read more
Sourceยง

fn prop_shuffle(self) -> Shuffle<Self>
where Self: Sized, Self::Value: Shuffleable,

Shuffle the contents of the values produced by this strategy. Read more
Sourceยง

fn boxed(self) -> BoxedStrategy<Self::Value>
where Self: Sized + 'static,

Erases the type of this Strategy so it can be passed around as a simple trait object. Read more
Sourceยง

fn sboxed(self) -> SBoxedStrategy<Self::Value>
where Self: Sized + Send + Sync + 'static,

Erases the type of this Strategy so it can be passed around as a simple trait object. Read more
Sourceยง

fn no_shrink(self) -> NoShrink<Self>
where Self: Sized,

Wraps this strategy to prevent values from being subject to shrinking. Read more
Sourceยง

impl Strategy for Range<u16>

Sourceยง

type Tree = BinarySearch

The value tree generated by this Strategy.
Sourceยง

type Value = u16

The type of value used by functions under test generated by this Strategy. Read more
Sourceยง

fn new_tree( &self, runner: &mut TestRunner, ) -> Result<<Range<u16> as Strategy>::Tree, Reason>

Generate a new value tree from the given runner. Read more
Sourceยง

fn prop_map<O, F>(self, fun: F) -> Map<Self, F>
where O: Debug, F: Fn(Self::Value) -> O, Self: Sized,

Returns a strategy which produces values transformed by the function fun. Read more
Sourceยง

fn prop_map_into<O>(self) -> MapInto<Self, O>
where O: Debug, Self: Sized, Self::Value: Into<O>,

Returns a strategy which produces values of type O by transforming Self with Into<O>. Read more
Sourceยง

fn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
where O: Debug, F: Fn(Self::Value, TestRng) -> O, Self: Sized,

Returns a strategy which produces values transformed by the function fun, which is additionally given a random number generator. Read more
Sourceยง

fn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Maps values produced by this strategy into new strategies and picks values from those strategies. Read more
Sourceยง

fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Maps values produced by this strategy into new strategies and picks values from those strategies while considering the new strategies to be independent. Read more
Sourceยง

fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Similar to prop_ind_flat_map(), but produces 2-tuples with the input generated from self in slot 0 and the derived strategy in slot 1. Read more
Sourceยง

fn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
where R: Into<Reason>, F: Fn(&Self::Value) -> bool, Self: Sized,

Returns a strategy which only produces values accepted by fun. Read more
Sourceยง

fn prop_filter_map<F, O>( self, whence: impl Into<Reason>, fun: F, ) -> FilterMap<Self, F>
where F: Fn(Self::Value) -> Option<O>, O: Debug, Self: Sized,

Returns a strategy which only produces transformed values where fun returns Some(value) and rejects those where fun returns None. Read more
Sourceยง

fn prop_union(self, other: Self) -> Union<Self>
where Self: Sized,

Returns a strategy which picks uniformly from self and other. Read more
Sourceยง

fn prop_recursive<R, F>( self, depth: u32, desired_size: u32, expected_branch_size: u32, recurse: F, ) -> Recursive<Self::Value, F>
where R: Strategy<Value = Self::Value> + 'static, F: Fn(BoxedStrategy<Self::Value>) -> R, Self: Sized + 'static,

Generate a recursive structure with self items as leaves. Read more
Sourceยง

fn prop_shuffle(self) -> Shuffle<Self>
where Self: Sized, Self::Value: Shuffleable,

Shuffle the contents of the values produced by this strategy. Read more
Sourceยง

fn boxed(self) -> BoxedStrategy<Self::Value>
where Self: Sized + 'static,

Erases the type of this Strategy so it can be passed around as a simple trait object. Read more
Sourceยง

fn sboxed(self) -> SBoxedStrategy<Self::Value>
where Self: Sized + Send + Sync + 'static,

Erases the type of this Strategy so it can be passed around as a simple trait object. Read more
Sourceยง

fn no_shrink(self) -> NoShrink<Self>
where Self: Sized,

Wraps this strategy to prevent values from being subject to shrinking. Read more
Sourceยง

impl Strategy for Range<u32>

Sourceยง

type Tree = BinarySearch

The value tree generated by this Strategy.
Sourceยง

type Value = u32

The type of value used by functions under test generated by this Strategy. Read more
Sourceยง

fn new_tree( &self, runner: &mut TestRunner, ) -> Result<<Range<u32> as Strategy>::Tree, Reason>

Generate a new value tree from the given runner. Read more
Sourceยง

fn prop_map<O, F>(self, fun: F) -> Map<Self, F>
where O: Debug, F: Fn(Self::Value) -> O, Self: Sized,

Returns a strategy which produces values transformed by the function fun. Read more
Sourceยง

fn prop_map_into<O>(self) -> MapInto<Self, O>
where O: Debug, Self: Sized, Self::Value: Into<O>,

Returns a strategy which produces values of type O by transforming Self with Into<O>. Read more
Sourceยง

fn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
where O: Debug, F: Fn(Self::Value, TestRng) -> O, Self: Sized,

Returns a strategy which produces values transformed by the function fun, which is additionally given a random number generator. Read more
Sourceยง

fn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Maps values produced by this strategy into new strategies and picks values from those strategies. Read more
Sourceยง

fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Maps values produced by this strategy into new strategies and picks values from those strategies while considering the new strategies to be independent. Read more
Sourceยง

fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Similar to prop_ind_flat_map(), but produces 2-tuples with the input generated from self in slot 0 and the derived strategy in slot 1. Read more
Sourceยง

fn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
where R: Into<Reason>, F: Fn(&Self::Value) -> bool, Self: Sized,

Returns a strategy which only produces values accepted by fun. Read more
Sourceยง

fn prop_filter_map<F, O>( self, whence: impl Into<Reason>, fun: F, ) -> FilterMap<Self, F>
where F: Fn(Self::Value) -> Option<O>, O: Debug, Self: Sized,

Returns a strategy which only produces transformed values where fun returns Some(value) and rejects those where fun returns None. Read more
Sourceยง

fn prop_union(self, other: Self) -> Union<Self>
where Self: Sized,

Returns a strategy which picks uniformly from self and other. Read more
Sourceยง

fn prop_recursive<R, F>( self, depth: u32, desired_size: u32, expected_branch_size: u32, recurse: F, ) -> Recursive<Self::Value, F>
where R: Strategy<Value = Self::Value> + 'static, F: Fn(BoxedStrategy<Self::Value>) -> R, Self: Sized + 'static,

Generate a recursive structure with self items as leaves. Read more
Sourceยง

fn prop_shuffle(self) -> Shuffle<Self>
where Self: Sized, Self::Value: Shuffleable,

Shuffle the contents of the values produced by this strategy. Read more
Sourceยง

fn boxed(self) -> BoxedStrategy<Self::Value>
where Self: Sized + 'static,

Erases the type of this Strategy so it can be passed around as a simple trait object. Read more
Sourceยง

fn sboxed(self) -> SBoxedStrategy<Self::Value>
where Self: Sized + Send + Sync + 'static,

Erases the type of this Strategy so it can be passed around as a simple trait object. Read more
Sourceยง

fn no_shrink(self) -> NoShrink<Self>
where Self: Sized,

Wraps this strategy to prevent values from being subject to shrinking. Read more
Sourceยง

impl Strategy for Range<u64>

Sourceยง

type Tree = BinarySearch

The value tree generated by this Strategy.
Sourceยง

type Value = u64

The type of value used by functions under test generated by this Strategy. Read more
Sourceยง

fn new_tree( &self, runner: &mut TestRunner, ) -> Result<<Range<u64> as Strategy>::Tree, Reason>

Generate a new value tree from the given runner. Read more
Sourceยง

fn prop_map<O, F>(self, fun: F) -> Map<Self, F>
where O: Debug, F: Fn(Self::Value) -> O, Self: Sized,

Returns a strategy which produces values transformed by the function fun. Read more
Sourceยง

fn prop_map_into<O>(self) -> MapInto<Self, O>
where O: Debug, Self: Sized, Self::Value: Into<O>,

Returns a strategy which produces values of type O by transforming Self with Into<O>. Read more
Sourceยง

fn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
where O: Debug, F: Fn(Self::Value, TestRng) -> O, Self: Sized,

Returns a strategy which produces values transformed by the function fun, which is additionally given a random number generator. Read more
Sourceยง

fn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Maps values produced by this strategy into new strategies and picks values from those strategies. Read more
Sourceยง

fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Maps values produced by this strategy into new strategies and picks values from those strategies while considering the new strategies to be independent. Read more
Sourceยง

fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Similar to prop_ind_flat_map(), but produces 2-tuples with the input generated from self in slot 0 and the derived strategy in slot 1. Read more
Sourceยง

fn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
where R: Into<Reason>, F: Fn(&Self::Value) -> bool, Self: Sized,

Returns a strategy which only produces values accepted by fun. Read more
Sourceยง

fn prop_filter_map<F, O>( self, whence: impl Into<Reason>, fun: F, ) -> FilterMap<Self, F>
where F: Fn(Self::Value) -> Option<O>, O: Debug, Self: Sized,

Returns a strategy which only produces transformed values where fun returns Some(value) and rejects those where fun returns None. Read more
Sourceยง

fn prop_union(self, other: Self) -> Union<Self>
where Self: Sized,

Returns a strategy which picks uniformly from self and other. Read more
Sourceยง

fn prop_recursive<R, F>( self, depth: u32, desired_size: u32, expected_branch_size: u32, recurse: F, ) -> Recursive<Self::Value, F>
where R: Strategy<Value = Self::Value> + 'static, F: Fn(BoxedStrategy<Self::Value>) -> R, Self: Sized + 'static,

Generate a recursive structure with self items as leaves. Read more
Sourceยง

fn prop_shuffle(self) -> Shuffle<Self>
where Self: Sized, Self::Value: Shuffleable,

Shuffle the contents of the values produced by this strategy. Read more
Sourceยง

fn boxed(self) -> BoxedStrategy<Self::Value>
where Self: Sized + 'static,

Erases the type of this Strategy so it can be passed around as a simple trait object. Read more
Sourceยง

fn sboxed(self) -> SBoxedStrategy<Self::Value>
where Self: Sized + Send + Sync + 'static,

Erases the type of this Strategy so it can be passed around as a simple trait object. Read more
Sourceยง

fn no_shrink(self) -> NoShrink<Self>
where Self: Sized,

Wraps this strategy to prevent values from being subject to shrinking. Read more
Sourceยง

impl Strategy for Range<u8>

Sourceยง

type Tree = BinarySearch

The value tree generated by this Strategy.
Sourceยง

type Value = u8

The type of value used by functions under test generated by this Strategy. Read more
Sourceยง

fn new_tree( &self, runner: &mut TestRunner, ) -> Result<<Range<u8> as Strategy>::Tree, Reason>

Generate a new value tree from the given runner. Read more
Sourceยง

fn prop_map<O, F>(self, fun: F) -> Map<Self, F>
where O: Debug, F: Fn(Self::Value) -> O, Self: Sized,

Returns a strategy which produces values transformed by the function fun. Read more
Sourceยง

fn prop_map_into<O>(self) -> MapInto<Self, O>
where O: Debug, Self: Sized, Self::Value: Into<O>,

Returns a strategy which produces values of type O by transforming Self with Into<O>. Read more
Sourceยง

fn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
where O: Debug, F: Fn(Self::Value, TestRng) -> O, Self: Sized,

Returns a strategy which produces values transformed by the function fun, which is additionally given a random number generator. Read more
Sourceยง

fn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Maps values produced by this strategy into new strategies and picks values from those strategies. Read more
Sourceยง

fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Maps values produced by this strategy into new strategies and picks values from those strategies while considering the new strategies to be independent. Read more
Sourceยง

fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Similar to prop_ind_flat_map(), but produces 2-tuples with the input generated from self in slot 0 and the derived strategy in slot 1. Read more
Sourceยง

fn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
where R: Into<Reason>, F: Fn(&Self::Value) -> bool, Self: Sized,

Returns a strategy which only produces values accepted by fun. Read more
Sourceยง

fn prop_filter_map<F, O>( self, whence: impl Into<Reason>, fun: F, ) -> FilterMap<Self, F>
where F: Fn(Self::Value) -> Option<O>, O: Debug, Self: Sized,

Returns a strategy which only produces transformed values where fun returns Some(value) and rejects those where fun returns None. Read more
Sourceยง

fn prop_union(self, other: Self) -> Union<Self>
where Self: Sized,

Returns a strategy which picks uniformly from self and other. Read more
Sourceยง

fn prop_recursive<R, F>( self, depth: u32, desired_size: u32, expected_branch_size: u32, recurse: F, ) -> Recursive<Self::Value, F>
where R: Strategy<Value = Self::Value> + 'static, F: Fn(BoxedStrategy<Self::Value>) -> R, Self: Sized + 'static,

Generate a recursive structure with self items as leaves. Read more
Sourceยง

fn prop_shuffle(self) -> Shuffle<Self>
where Self: Sized, Self::Value: Shuffleable,

Shuffle the contents of the values produced by this strategy. Read more
Sourceยง

fn boxed(self) -> BoxedStrategy<Self::Value>
where Self: Sized + 'static,

Erases the type of this Strategy so it can be passed around as a simple trait object. Read more
Sourceยง

fn sboxed(self) -> SBoxedStrategy<Self::Value>
where Self: Sized + Send + Sync + 'static,

Erases the type of this Strategy so it can be passed around as a simple trait object. Read more
Sourceยง

fn no_shrink(self) -> NoShrink<Self>
where Self: Sized,

Wraps this strategy to prevent values from being subject to shrinking. Read more
Sourceยง

impl Strategy for Range<usize>

Sourceยง

type Tree = BinarySearch

The value tree generated by this Strategy.
Sourceยง

type Value = usize

The type of value used by functions under test generated by this Strategy. Read more
Sourceยง

fn new_tree( &self, runner: &mut TestRunner, ) -> Result<<Range<usize> as Strategy>::Tree, Reason>

Generate a new value tree from the given runner. Read more
Sourceยง

fn prop_map<O, F>(self, fun: F) -> Map<Self, F>
where O: Debug, F: Fn(Self::Value) -> O, Self: Sized,

Returns a strategy which produces values transformed by the function fun. Read more
Sourceยง

fn prop_map_into<O>(self) -> MapInto<Self, O>
where O: Debug, Self: Sized, Self::Value: Into<O>,

Returns a strategy which produces values of type O by transforming Self with Into<O>. Read more
Sourceยง

fn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
where O: Debug, F: Fn(Self::Value, TestRng) -> O, Self: Sized,

Returns a strategy which produces values transformed by the function fun, which is additionally given a random number generator. Read more
Sourceยง

fn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Maps values produced by this strategy into new strategies and picks values from those strategies. Read more
Sourceยง

fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Maps values produced by this strategy into new strategies and picks values from those strategies while considering the new strategies to be independent. Read more
Sourceยง

fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
where S: Strategy, F: Fn(Self::Value) -> S, Self: Sized,

Similar to prop_ind_flat_map(), but produces 2-tuples with the input generated from self in slot 0 and the derived strategy in slot 1. Read more
Sourceยง

fn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
where R: Into<Reason>, F: Fn(&Self::Value) -> bool, Self: Sized,

Returns a strategy which only produces values accepted by fun. Read more
Sourceยง

fn prop_filter_map<F, O>( self, whence: impl Into<Reason>, fun: F, ) -> FilterMap<Self, F>
where F: Fn(Self::Value) -> Option<O>, O: Debug, Self: Sized,

Returns a strategy which only produces transformed values where fun returns Some(value) and rejects those where fun returns None. Read more
Sourceยง

fn prop_union(self, other: Self) -> Union<Self>
where Self: Sized,

Returns a strategy which picks uniformly from self and other. Read more
Sourceยง

fn prop_recursive<R, F>( self, depth: u32, desired_size: u32, expected_branch_size: u32, recurse: F, ) -> Recursive<Self::Value, F>
where R: Strategy<Value = Self::Value> + 'static, F: Fn(BoxedStrategy<Self::Value>) -> R, Self: Sized + 'static,

Generate a recursive structure with self items as leaves. Read more
Sourceยง

fn prop_shuffle(self) -> Shuffle<Self>
where Self: Sized, Self::Value: Shuffleable,

Shuffle the contents of the values produced by this strategy. Read more
Sourceยง

fn boxed(self) -> BoxedStrategy<Self::Value>
where Self: Sized + 'static,

Erases the type of this Strategy so it can be passed around as a simple trait object. Read more
Sourceยง

fn sboxed(self) -> SBoxedStrategy<Self::Value>
where Self: Sized + Send + Sync + 'static,

Erases the type of this Strategy so it can be passed around as a simple trait object. Read more
Sourceยง

fn no_shrink(self) -> NoShrink<Self>
where Self: Sized,

Wraps this strategy to prevent values from being subject to shrinking. Read more
Sourceยง

impl<'data> TryFrom<&Range<char>> for CodePointInversionList<'data>

Sourceยง

type Error = CodePointInversionListError

The type returned in the event of a conversion error.
Sourceยง

fn try_from( range: &Range<char>, ) -> Result<CodePointInversionList<'data>, <CodePointInversionList<'data> as TryFrom<&Range<char>>>::Error>

Performs the conversion.
Sourceยง

impl<X> TryFrom<Range<X>> for Uniform<X>
where X: SampleUniform,

Sourceยง

type Error = Error

The type returned in the event of a conversion error.
Sourceยง

fn try_from(r: Range<X>) -> Result<Uniform<X>, Error>

Performs the conversion.
1.0.0 ยท Sourceยง

impl<Idx> Eq for Range<Idx>
where Idx: Eq,

1.26.0 ยท Sourceยง

impl<A> FusedIterator for Range<A>
where A: Step,

1.0.0 ยท Sourceยง

impl<Idx> StructuralPartialEq for Range<Idx>

Sourceยง

impl<A> TrustedLen for Range<A>
where A: TrustedStep,

Auto Trait Implementationsยง

ยง

impl<Idx> Freeze for Range<Idx>
where Idx: Freeze,

ยง

impl<Idx> RefUnwindSafe for Range<Idx>
where Idx: RefUnwindSafe,

ยง

impl<Idx> Send for Range<Idx>
where Idx: Send,

ยง

impl<Idx> Sync for Range<Idx>
where Idx: Sync,

ยง

impl<Idx> Unpin for Range<Idx>
where Idx: Unpin,

ยง

impl<Idx> UnwindSafe for Range<Idx>
where Idx: UnwindSafe,

Blanket Implementationsยง

Sourceยง

impl<T> Any for T
where T: 'static + ?Sized,

Sourceยง

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Sourceยง

impl<T> Borrow<T> for T
where T: ?Sized,

Sourceยง

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Sourceยง

impl<T> BorrowMut<T> for T
where T: ?Sized,

Sourceยง

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Sourceยง

impl<T> CloneToUninit for T
where T: Clone,

Sourceยง

unsafe fn clone_to_uninit(&self, dst: *mut u8)

๐Ÿ”ฌThis is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Sourceยง

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Sourceยง

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Sourceยง

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Sourceยง

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Sourceยง

impl<T> From<T> for T

Sourceยง

fn from(t: T) -> T

Returns the argument unchanged.

Sourceยง

impl<T> FromRef<T> for T
where T: Clone,

Sourceยง

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Sourceยง

impl<T> Instrument for T

Sourceยง

fn instrument(self, span: Span) -> Instrumented<Self> โ“˜

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Sourceยง

fn in_current_span(self) -> Instrumented<Self> โ“˜

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Sourceยง

impl<T, U> Into<U> for T
where U: From<T>,

Sourceยง

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Sourceยง

impl<T> IntoEither for T

Sourceยง

fn into_either(self, into_left: bool) -> Either<Self, Self> โ“˜

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Sourceยง

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> โ“˜
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Sourceยง

impl<I> IntoIterator for I
where I: Iterator,

Sourceยง

type Item = <I as Iterator>::Item

The type of the elements being iterated over.
Sourceยง

type IntoIter = I

Which kind of iterator are we turning this into?
Sourceยง

fn into_iter(self) -> I

Creates an iterator from a value. Read more
Sourceยง

impl<I> IntoResettable<ValueParser> for I
where I: Into<ValueParser>,

Sourceยง

fn into_resettable(self) -> Resettable<ValueParser>

Convert to the intended resettable type
Sourceยง

impl<I> IntoResettable<ValueRange> for I
where I: Into<ValueRange>,

Sourceยง

fn into_resettable(self) -> Resettable<ValueRange>

Convert to the intended resettable type
Sourceยง

impl<I> IteratorRandom for I
where I: Iterator,

Sourceยง

fn choose<R>(self, rng: &mut R) -> Option<Self::Item>
where R: Rng + ?Sized,

Choose one element at random from the iterator. Read more
Sourceยง

fn choose_stable<R>(self, rng: &mut R) -> Option<Self::Item>
where R: Rng + ?Sized,

Choose one element at random from the iterator. Read more
Sourceยง

fn choose_multiple_fill<R>(self, rng: &mut R, buf: &mut [Self::Item]) -> usize
where R: Rng + ?Sized,

Collects values at random from the iterator into a supplied buffer until that buffer is filled. Read more
Sourceยง

fn choose_multiple<R>(self, rng: &mut R, amount: usize) -> Vec<Self::Item>
where R: Rng + ?Sized,

Collects amount values at random from the iterator into a vector. Read more
Sourceยง

impl<I> IteratorRandom for I
where I: Iterator,

Sourceยง

fn choose<R>(self, rng: &mut R) -> Option<Self::Item>
where R: Rng + ?Sized,

Uniformly sample one element Read more
Sourceยง

fn choose_stable<R>(self, rng: &mut R) -> Option<Self::Item>
where R: Rng + ?Sized,

Uniformly sample one element (stable) Read more
Sourceยง

fn choose_multiple_fill<R>(self, rng: &mut R, buf: &mut [Self::Item]) -> usize
where R: Rng + ?Sized,

Uniformly sample amount distinct elements into a buffer Read more
Sourceยง

fn choose_multiple<R>(self, rng: &mut R, amount: usize) -> Vec<Self::Item>
where R: Rng + ?Sized,

Uniformly sample amount distinct elements into a Vec Read more
Sourceยง

impl<T> Itertools for T
where T: Iterator + ?Sized,

Sourceยง

fn interleave<J>( self, other: J, ) -> Interleave<Self, <J as IntoIterator>::IntoIter> โ“˜
where J: IntoIterator<Item = Self::Item>, Self: Sized,

Alternate elements from two iterators until both have run out. Read more
Sourceยง

fn interleave_shortest<J>( self, other: J, ) -> InterleaveShortest<Self, <J as IntoIterator>::IntoIter> โ“˜
where J: IntoIterator<Item = Self::Item>, Self: Sized,

Alternate elements from two iterators until at least one of them has run out. Read more
Sourceยง

fn intersperse( self, element: Self::Item, ) -> IntersperseWith<Self, IntersperseElementSimple<Self::Item>> โ“˜
where Self: Sized, Self::Item: Clone,

An iterator adaptor to insert a particular value between each element of the adapted iterator. Read more
Sourceยง

fn intersperse_with<F>(self, element: F) -> IntersperseWith<Self, F> โ“˜
where Self: Sized, F: FnMut() -> Self::Item,

An iterator adaptor to insert a particular value created by a function between each element of the adapted iterator. Read more
Sourceยง

fn get<R>(self, index: R) -> <R as IteratorIndex<Self>>::Output
where Self: Sized, R: IteratorIndex<Self>,

Returns an iterator over a subsection of the iterator. Read more
Sourceยง

fn zip_longest<J>( self, other: J, ) -> ZipLongest<Self, <J as IntoIterator>::IntoIter> โ“˜
where J: IntoIterator, Self: Sized,

Create an iterator which iterates over both this and the specified iterator simultaneously, yielding pairs of two optional elements. Read more
Sourceยง

fn zip_eq<J>(self, other: J) -> ZipEq<Self, <J as IntoIterator>::IntoIter> โ“˜
where J: IntoIterator, Self: Sized,

Create an iterator which iterates over both this and the specified iterator simultaneously, yielding pairs of elements. Read more
Sourceยง

fn batching<B, F>(self, f: F) -> Batching<Self, F> โ“˜
where F: FnMut(&mut Self) -> Option<B>, Self: Sized,

A โ€œmeta iterator adaptorโ€. Its closure receives a reference to the iterator and may pick off as many elements as it likes, to produce the next iterator element. Read more
Sourceยง

fn chunk_by<K, F>(self, key: F) -> ChunkBy<K, Self, F>
where Self: Sized, F: FnMut(&Self::Item) -> K, K: PartialEq,

Return an iterable that can group iterator elements. Consecutive elements that map to the same key (โ€œrunsโ€), are assigned to the same group. Read more
Sourceยง

fn group_by<K, F>(self, key: F) -> ChunkBy<K, Self, F>
where Self: Sized, F: FnMut(&Self::Item) -> K, K: PartialEq,

๐Ÿ‘ŽDeprecated since 0.13.0: Use .chunk_by() instead
Sourceยง

fn chunks(self, size: usize) -> IntoChunks<Self>
where Self: Sized,

Return an iterable that can chunk the iterator. Read more
Sourceยง

fn tuple_windows<T>(self) -> TupleWindows<Self, T> โ“˜
where Self: Sized + Iterator<Item = <T as TupleCollect>::Item>, T: HomogeneousTuple, <T as TupleCollect>::Item: Clone,

Return an iterator over all contiguous windows producing tuples of a specific size (up to 12). Read more
Sourceยง

fn circular_tuple_windows<T>(self) -> CircularTupleWindows<Self, T> โ“˜
where Self: Sized + Clone + Iterator<Item = <T as TupleCollect>::Item> + ExactSizeIterator, T: TupleCollect + Clone, <T as TupleCollect>::Item: Clone,

Return an iterator over all windows, wrapping back to the first elements when the window would otherwise exceed the length of the iterator, producing tuples of a specific size (up to 12). Read more
Sourceยง

fn tuples<T>(self) -> Tuples<Self, T> โ“˜
where Self: Sized + Iterator<Item = <T as TupleCollect>::Item>, T: HomogeneousTuple,

Return an iterator that groups the items in tuples of a specific size (up to 12). Read more
Sourceยง

fn tee(self) -> (Tee<Self>, Tee<Self>)
where Self: Sized, Self::Item: Clone,

Split into an iterator pair that both yield all elements from the original iterator. Read more
Sourceยง

fn map_into<R>(self) -> MapSpecialCase<Self, MapSpecialCaseFnInto<R>>
where Self: Sized, Self::Item: Into<R>,

Convert each item of the iterator using the Into trait. Read more
Sourceยง

fn map_ok<F, T, U, E>(self, f: F) -> MapSpecialCase<Self, MapSpecialCaseFnOk<F>>
where Self: Sized + Iterator<Item = Result<T, E>>, F: FnMut(T) -> U,

Return an iterator adaptor that applies the provided closure to every Result::Ok value. Result::Err values are unchanged. Read more
Sourceยง

fn filter_ok<F, T, E>(self, f: F) -> FilterOk<Self, F> โ“˜
where Self: Sized + Iterator<Item = Result<T, E>>, F: FnMut(&T) -> bool,

Return an iterator adaptor that filters every Result::Ok value with the provided closure. Result::Err values are unchanged. Read more
Sourceยง

fn filter_map_ok<F, T, U, E>(self, f: F) -> FilterMapOk<Self, F> โ“˜
where Self: Sized + Iterator<Item = Result<T, E>>, F: FnMut(T) -> Option<U>,

Return an iterator adaptor that filters and transforms every Result::Ok value with the provided closure. Result::Err values are unchanged. Read more
Sourceยง

fn flatten_ok<T, E>(self) -> FlattenOk<Self, T, E> โ“˜
where Self: Sized + Iterator<Item = Result<T, E>>, T: IntoIterator,

Return an iterator adaptor that flattens every Result::Ok value into a series of Result::Ok values. Result::Err values are unchanged. Read more
Sourceยง

fn process_results<F, T, E, R>(self, processor: F) -> Result<R, E>
where Self: Sized + Iterator<Item = Result<T, E>>, F: FnOnce(ProcessResults<'_, Self, E>) -> R,

โ€œLiftโ€ a function of the values of the current iterator so as to process an iterator of Result values instead. Read more
Sourceยง

fn merge<J>( self, other: J, ) -> MergeBy<Self, <J as IntoIterator>::IntoIter, MergeLte> โ“˜
where Self: Sized, Self::Item: PartialOrd, J: IntoIterator<Item = Self::Item>,

Return an iterator adaptor that merges the two base iterators in ascending order. If both base iterators are sorted (ascending), the result is sorted. Read more
Sourceยง

fn merge_by<J, F>( self, other: J, is_first: F, ) -> MergeBy<Self, <J as IntoIterator>::IntoIter, F> โ“˜
where Self: Sized, J: IntoIterator<Item = Self::Item>, F: FnMut(&Self::Item, &Self::Item) -> bool,

Return an iterator adaptor that merges the two base iterators in order. This is much like .merge() but allows for a custom ordering. Read more
Sourceยง

fn merge_join_by<J, F, T>( self, other: J, cmp_fn: F, ) -> MergeBy<Self, <J as IntoIterator>::IntoIter, MergeFuncLR<F, <F as FuncLR<Self::Item, <<J as IntoIterator>::IntoIter as Iterator>::Item>>::T>> โ“˜
where J: IntoIterator, F: FnMut(&Self::Item, &<J as IntoIterator>::Item) -> T, Self: Sized,

Create an iterator that merges items from both this and the specified iterator in ascending order. Read more
Sourceยง

fn kmerge(self) -> KMergeBy<<Self::Item as IntoIterator>::IntoIter, KMergeByLt> โ“˜
where Self: Sized, Self::Item: IntoIterator, <Self::Item as IntoIterator>::Item: PartialOrd,

Return an iterator adaptor that flattens an iterator of iterators by merging them in ascending order. Read more
Sourceยง

fn kmerge_by<F>( self, first: F, ) -> KMergeBy<<Self::Item as IntoIterator>::IntoIter, F> โ“˜
where Self: Sized, Self::Item: IntoIterator, F: FnMut(&<Self::Item as IntoIterator>::Item, &<Self::Item as IntoIterator>::Item) -> bool,

Return an iterator adaptor that flattens an iterator of iterators by merging them according to the given closure. Read more
Sourceยง

fn cartesian_product<J>( self, other: J, ) -> Product<Self, <J as IntoIterator>::IntoIter> โ“˜
where Self: Sized, Self::Item: Clone, J: IntoIterator, <J as IntoIterator>::IntoIter: Clone,

Return an iterator adaptor that iterates over the cartesian product of the element sets of two iterators self and J. Read more
Sourceยง

fn multi_cartesian_product( self, ) -> MultiProduct<<Self::Item as IntoIterator>::IntoIter> โ“˜
where Self: Sized, Self::Item: IntoIterator, <Self::Item as IntoIterator>::IntoIter: Clone, <Self::Item as IntoIterator>::Item: Clone,

Return an iterator adaptor that iterates over the cartesian product of all subiterators returned by meta-iterator self. Read more
Sourceยง

fn coalesce<F>(self, f: F) -> CoalesceBy<Self, F, NoCount>
where Self: Sized, F: FnMut(Self::Item, Self::Item) -> Result<Self::Item, (Self::Item, Self::Item)>,

Return an iterator adaptor that uses the passed-in closure to optionally merge together consecutive elements. Read more
Sourceยง

fn dedup(self) -> CoalesceBy<Self, DedupPred2CoalescePred<DedupEq>, NoCount>
where Self: Sized, Self::Item: PartialEq,

Remove duplicates from sections of consecutive identical elements. If the iterator is sorted, all elements will be unique. Read more
Sourceยง

fn dedup_by<Cmp>( self, cmp: Cmp, ) -> CoalesceBy<Self, DedupPred2CoalescePred<Cmp>, NoCount>
where Self: Sized, Cmp: FnMut(&Self::Item, &Self::Item) -> bool,

Remove duplicates from sections of consecutive identical elements, determining equality using a comparison function. If the iterator is sorted, all elements will be unique. Read more
Sourceยง

fn dedup_with_count( self, ) -> CoalesceBy<Self, DedupPredWithCount2CoalescePred<DedupEq>, WithCount>
where Self: Sized,

Remove duplicates from sections of consecutive identical elements, while keeping a count of how many repeated elements were present. If the iterator is sorted, all elements will be unique. Read more
Sourceยง

fn dedup_by_with_count<Cmp>( self, cmp: Cmp, ) -> CoalesceBy<Self, DedupPredWithCount2CoalescePred<Cmp>, WithCount>
where Self: Sized, Cmp: FnMut(&Self::Item, &Self::Item) -> bool,

Remove duplicates from sections of consecutive identical elements, while keeping a count of how many repeated elements were present. This will determine equality using a comparison function. If the iterator is sorted, all elements will be unique. Read more
Sourceยง

fn duplicates(self) -> DuplicatesBy<Self, Self::Item, ById>
where Self: Sized, Self::Item: Eq + Hash,

Return an iterator adaptor that produces elements that appear more than once during the iteration. Duplicates are detected using hash and equality. Read more
Sourceยง

fn duplicates_by<V, F>(self, f: F) -> DuplicatesBy<Self, V, ByFn<F>>
where Self: Sized, V: Eq + Hash, F: FnMut(&Self::Item) -> V,

Return an iterator adaptor that produces elements that appear more than once during the iteration. Duplicates are detected using hash and equality. Read more
Sourceยง

fn unique(self) -> Unique<Self> โ“˜
where Self: Sized, Self::Item: Clone + Eq + Hash,

Return an iterator adaptor that filters out elements that have already been produced once during the iteration. Duplicates are detected using hash and equality. Read more
Sourceยง

fn unique_by<V, F>(self, f: F) -> UniqueBy<Self, V, F> โ“˜
where Self: Sized, V: Eq + Hash, F: FnMut(&Self::Item) -> V,

Return an iterator adaptor that filters out elements that have already been produced once during the iteration. Read more
Sourceยง

fn peeking_take_while<F>(&mut self, accept: F) -> PeekingTakeWhile<'_, Self, F> โ“˜
where Self: Sized + PeekingNext, F: FnMut(&Self::Item) -> bool,

Return an iterator adaptor that borrows from this iterator and takes items while the closure accept returns true. Read more
Sourceยง

fn take_while_ref<F>(&mut self, accept: F) -> TakeWhileRef<'_, Self, F> โ“˜
where Self: Clone, F: FnMut(&Self::Item) -> bool,

Return an iterator adaptor that borrows from a Clone-able iterator to only pick off elements while the predicate accept returns true. Read more
Sourceยง

fn take_while_inclusive<F>(self, accept: F) -> TakeWhileInclusive<Self, F> โ“˜
where Self: Sized, F: FnMut(&Self::Item) -> bool,

Returns an iterator adaptor that consumes elements while the given predicate is true, including the element for which the predicate first returned false. Read more
Sourceยง

fn while_some<A>(self) -> WhileSome<Self> โ“˜
where Self: Sized + Iterator<Item = Option<A>>,

Return an iterator adaptor that filters Option<A> iterator elements and produces A. Stops on the first None encountered. Read more
Sourceยง

fn tuple_combinations<T>(self) -> TupleCombinations<Self, T> โ“˜
where Self: Sized + Clone, Self::Item: Clone, T: HasCombination<Self>,

Return an iterator adaptor that iterates over the combinations of the elements from an iterator. Read more
Sourceยง

fn array_combinations<const K: usize>( self, ) -> CombinationsGeneric<Self, [usize; K]>
where Self: Sized + Clone, Self::Item: Clone,

Return an iterator adaptor that iterates over the combinations of the elements from an iterator. Read more
Sourceยง

fn combinations(self, k: usize) -> CombinationsGeneric<Self, Vec<usize>>
where Self: Sized, Self::Item: Clone,

Return an iterator adaptor that iterates over the k-length combinations of the elements from an iterator. Read more
Sourceยง

fn combinations_with_replacement( self, k: usize, ) -> CombinationsWithReplacement<Self> โ“˜
where Self: Sized, Self::Item: Clone,

Return an iterator that iterates over the k-length combinations of the elements from an iterator, with replacement. Read more
Sourceยง

fn permutations(self, k: usize) -> Permutations<Self> โ“˜
where Self: Sized, Self::Item: Clone,

Return an iterator adaptor that iterates over all k-permutations of the elements from an iterator. Read more
Sourceยง

fn powerset(self) -> Powerset<Self> โ“˜
where Self: Sized, Self::Item: Clone,

Return an iterator that iterates through the powerset of the elements from an iterator. Read more
Sourceยง

fn pad_using<F>(self, min: usize, f: F) -> PadUsing<Self, F> โ“˜
where Self: Sized, F: FnMut(usize) -> Self::Item,

Return an iterator adaptor that pads the sequence to a minimum length of min by filling missing elements using a closure f. Read more
Sourceยง

fn with_position(self) -> WithPosition<Self> โ“˜
where Self: Sized,

Return an iterator adaptor that combines each element with a Position to ease special-case handling of the first or last elements. Read more
Sourceยง

fn positions<P>(self, predicate: P) -> Positions<Self, P> โ“˜
where Self: Sized, P: FnMut(Self::Item) -> bool,

Return an iterator adaptor that yields the indices of all elements satisfying a predicate, counted from the start of the iterator. Read more
Sourceยง

fn update<F>(self, updater: F) -> Update<Self, F> โ“˜
where Self: Sized, F: FnMut(&mut Self::Item),

Return an iterator adaptor that applies a mutating function to each element before yielding it. Read more
Sourceยง

fn next_array<const N: usize>(&mut self) -> Option<[Self::Item; N]>
where Self: Sized,

Advances the iterator and returns the next items grouped in an array of a specific size. Read more
Sourceยง

fn collect_array<const N: usize>(self) -> Option<[Self::Item; N]>
where Self: Sized,

Collects all items from the iterator into an array of a specific size. Read more
Sourceยง

fn next_tuple<T>(&mut self) -> Option<T>
where Self: Sized + Iterator<Item = <T as TupleCollect>::Item>, T: HomogeneousTuple,

Advances the iterator and returns the next items grouped in a tuple of a specific size (up to 12). Read more
Sourceยง

fn collect_tuple<T>(self) -> Option<T>
where Self: Sized + Iterator<Item = <T as TupleCollect>::Item>, T: HomogeneousTuple,

Collects all items from the iterator into a tuple of a specific size (up to 12). Read more
Sourceยง

fn find_position<P>(&mut self, pred: P) -> Option<(usize, Self::Item)>
where P: FnMut(&Self::Item) -> bool,

Find the position and value of the first element satisfying a predicate. Read more
Sourceยง

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

Find the value of the first element satisfying a predicate or return the last element, if any. Read more
Sourceยง

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

Find the value of the first element satisfying a predicate or return the first element, if any. Read more
Sourceยง

fn contains<Q>(&mut self, query: &Q) -> bool
where Self: Sized, Self::Item: Borrow<Q>, Q: PartialEq + ?Sized,

Returns true if the given item is present in this iterator. Read more
Sourceยง

fn all_equal(&mut self) -> bool
where Self: Sized, Self::Item: PartialEq,

Check whether all elements compare equal. Read more
Sourceยง

fn all_equal_value( &mut self, ) -> Result<Self::Item, Option<(Self::Item, Self::Item)>>
where Self: Sized, Self::Item: PartialEq,

If there are elements and they are all equal, return a single copy of that element. If there are no elements, return an Error containing None. If there are elements and they are not all equal, return a tuple containing the first two non-equal elements found. Read more
Sourceยง

fn all_unique(&mut self) -> bool
where Self: Sized, Self::Item: Eq + Hash,

Check whether all elements are unique (non equal). Read more
Sourceยง

fn dropping(self, n: usize) -> Self
where Self: Sized,

Consume the first n elements from the iterator eagerly, and return the same iterator again. Read more
Sourceยง

fn dropping_back(self, n: usize) -> Self
where Self: Sized + DoubleEndedIterator,

Consume the last n elements from the iterator eagerly, and return the same iterator again. Read more
Sourceยง

fn concat(self) -> Self::Item
where Self: Sized, Self::Item: Extend<<Self::Item as IntoIterator>::Item> + IntoIterator + Default,

Combine all an iteratorโ€™s elements into one element by using Extend. Read more
Sourceยง

fn collect_vec(self) -> Vec<Self::Item>
where Self: Sized,

.collect_vec() is simply a type specialization of Iterator::collect, for convenience.
Sourceยง

fn try_collect<T, U, E>(self) -> Result<U, E>
where Self: Sized + Iterator<Item = Result<T, E>>, Result<U, E>: FromIterator<Result<T, E>>,

.try_collect() is more convenient way of writing .collect::<Result<_, _>>() Read more
Sourceยง

fn set_from<'a, A, J>(&mut self, from: J) -> usize
where A: 'a, Self: Iterator<Item = &'a mut A>, J: IntoIterator<Item = A>,

Assign to each reference in self from the from iterator, stopping at the shortest of the two iterators. Read more
Sourceยง

fn join(&mut self, sep: &str) -> String
where Self::Item: Display,

Combine all iterator elements into one String, separated by sep. Read more
Sourceยง

fn format(self, sep: &str) -> Format<'_, Self>
where Self: Sized,

Format all iterator elements, separated by sep. Read more
Sourceยง

fn format_with<F>(self, sep: &str, format: F) -> FormatWith<'_, Self, F>
where Self: Sized, F: FnMut(Self::Item, &mut dyn FnMut(&dyn Display) -> Result<(), Error>) -> Result<(), Error>,

Format all iterator elements, separated by sep. Read more
Sourceยง

fn fold_ok<A, E, B, F>(&mut self, start: B, f: F) -> Result<B, E>
where Self: Iterator<Item = Result<A, E>>, F: FnMut(B, A) -> B,

Fold Result values from an iterator. Read more
Sourceยง

fn fold_options<A, B, F>(&mut self, start: B, f: F) -> Option<B>
where Self: Iterator<Item = Option<A>>, F: FnMut(B, A) -> B,

Fold Option values from an iterator. Read more
Sourceยง

fn fold1<F>(self, f: F) -> Option<Self::Item>
where F: FnMut(Self::Item, Self::Item) -> Self::Item, Self: Sized,

๐Ÿ‘ŽDeprecated since 0.10.2: Use Iterator::reduce instead
Accumulator of the elements in the iterator. Read more
Sourceยง

fn tree_reduce<F>(self, f: F) -> Option<Self::Item>
where F: FnMut(Self::Item, Self::Item) -> Self::Item, Self: Sized,

Accumulate the elements in the iterator in a tree-like manner. Read more
Sourceยง

fn tree_fold1<F>(self, f: F) -> Option<Self::Item>
where F: FnMut(Self::Item, Self::Item) -> Self::Item, Self: Sized,

๐Ÿ‘ŽDeprecated since 0.13.0: Use .tree_reduce() instead
Sourceยง

fn fold_while<B, F>(&mut self, init: B, f: F) -> FoldWhile<B>
where Self: Sized, F: FnMut(B, Self::Item) -> FoldWhile<B>,

An iterator method that applies a function, producing a single, final value. Read more
Sourceยง

fn sum1<S>(self) -> Option<S>
where Self: Sized, S: Sum<Self::Item>,

Iterate over the entire iterator and add all the elements. Read more
Sourceยง

fn product1<P>(self) -> Option<P>
where Self: Sized, P: Product<Self::Item>,

Iterate over the entire iterator and multiply all the elements. Read more
Sourceยง

fn sorted_unstable(self) -> IntoIter<Self::Item> โ“˜
where Self: Sized, Self::Item: Ord,

Sort all iterator elements into a new iterator in ascending order. Read more
Sourceยง

fn sorted_unstable_by<F>(self, cmp: F) -> IntoIter<Self::Item> โ“˜
where Self: Sized, F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Sort all iterator elements into a new iterator in ascending order. Read more
Sourceยง

fn sorted_unstable_by_key<K, F>(self, f: F) -> IntoIter<Self::Item> โ“˜
where Self: Sized, K: Ord, F: FnMut(&Self::Item) -> K,

Sort all iterator elements into a new iterator in ascending order. Read more
Sourceยง

fn sorted(self) -> IntoIter<Self::Item> โ“˜
where Self: Sized, Self::Item: Ord,

Sort all iterator elements into a new iterator in ascending order. Read more
Sourceยง

fn sorted_by<F>(self, cmp: F) -> IntoIter<Self::Item> โ“˜
where Self: Sized, F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Sort all iterator elements into a new iterator in ascending order. Read more
Sourceยง

fn sorted_by_key<K, F>(self, f: F) -> IntoIter<Self::Item> โ“˜
where Self: Sized, K: Ord, F: FnMut(&Self::Item) -> K,

Sort all iterator elements into a new iterator in ascending order. Read more
Sourceยง

fn sorted_by_cached_key<K, F>(self, f: F) -> IntoIter<Self::Item> โ“˜
where Self: Sized, K: Ord, F: FnMut(&Self::Item) -> K,

Sort all iterator elements into a new iterator in ascending order. The key function is called exactly once per key. Read more
Sourceยง

fn k_smallest(self, k: usize) -> IntoIter<Self::Item> โ“˜
where Self: Sized, Self::Item: Ord,

Sort the k smallest elements into a new iterator, in ascending order. Read more
Sourceยง

fn k_smallest_by<F>(self, k: usize, cmp: F) -> IntoIter<Self::Item> โ“˜
where Self: Sized, F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Sort the k smallest elements into a new iterator using the provided comparison. Read more
Sourceยง

fn k_smallest_by_key<F, K>(self, k: usize, key: F) -> IntoIter<Self::Item> โ“˜
where Self: Sized, F: FnMut(&Self::Item) -> K, K: Ord,

Return the elements producing the k smallest outputs of the provided function. Read more
Sourceยง

fn k_smallest_relaxed(self, k: usize) -> IntoIter<Self::Item> โ“˜
where Self: Sized, Self::Item: Ord,

Sort the k smallest elements into a new iterator, in ascending order, relaxing the amount of memory required. Read more
Sourceยง

fn k_smallest_relaxed_by<F>(self, k: usize, cmp: F) -> IntoIter<Self::Item> โ“˜
where Self: Sized, F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Sort the k smallest elements into a new iterator using the provided comparison, relaxing the amount of memory required. Read more
Sourceยง

fn k_smallest_relaxed_by_key<F, K>( self, k: usize, key: F, ) -> IntoIter<Self::Item> โ“˜
where Self: Sized, F: FnMut(&Self::Item) -> K, K: Ord,

Return the elements producing the k smallest outputs of the provided function, relaxing the amount of memory required. Read more
Sourceยง

fn k_largest(self, k: usize) -> IntoIter<Self::Item> โ“˜
where Self: Sized, Self::Item: Ord,

Sort the k largest elements into a new iterator, in descending order. Read more
Sourceยง

fn k_largest_by<F>(self, k: usize, cmp: F) -> IntoIter<Self::Item> โ“˜
where Self: Sized, F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Sort the k largest elements into a new iterator using the provided comparison. Read more
Sourceยง

fn k_largest_by_key<F, K>(self, k: usize, key: F) -> IntoIter<Self::Item> โ“˜
where Self: Sized, F: FnMut(&Self::Item) -> K, K: Ord,

Return the elements producing the k largest outputs of the provided function. Read more
Sourceยง

fn k_largest_relaxed(self, k: usize) -> IntoIter<Self::Item> โ“˜
where Self: Sized, Self::Item: Ord,

Sort the k largest elements into a new iterator, in descending order, relaxing the amount of memory required. Read more
Sourceยง

fn k_largest_relaxed_by<F>(self, k: usize, cmp: F) -> IntoIter<Self::Item> โ“˜
where Self: Sized, F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Sort the k largest elements into a new iterator using the provided comparison, relaxing the amount of memory required. Read more
Sourceยง

fn k_largest_relaxed_by_key<F, K>( self, k: usize, key: F, ) -> IntoIter<Self::Item> โ“˜
where Self: Sized, F: FnMut(&Self::Item) -> K, K: Ord,

Return the elements producing the k largest outputs of the provided function, relaxing the amount of memory required. Read more
Sourceยง

fn tail(self, n: usize) -> IntoIter<Self::Item> โ“˜
where Self: Sized,

Consumes the iterator and return an iterator of the last n elements. Read more
Sourceยง

fn partition_map<A, B, F, L, R>(self, predicate: F) -> (A, B)
where Self: Sized, F: FnMut(Self::Item) -> Either<L, R>, A: Default + Extend<L>, B: Default + Extend<R>,

Collect all iterator elements into one of two partitions. Unlike Iterator::partition, each partition may have a distinct type. Read more
Sourceยง

fn partition_result<A, B, T, E>(self) -> (A, B)
where Self: Sized + Iterator<Item = Result<T, E>>, A: Default + Extend<T>, B: Default + Extend<E>,

Partition a sequence of Results into one list of all the Ok elements and another list of all the Err elements. Read more
Sourceยง

fn into_group_map<K, V>(self) -> HashMap<K, Vec<V>>
where Self: Sized + Iterator<Item = (K, V)>, K: Hash + Eq,

Return a HashMap of keys mapped to Vecs of values. Keys and values are taken from (Key, Value) tuple pairs yielded by the input iterator. Read more
Sourceยง

fn into_group_map_by<K, V, F>(self, f: F) -> HashMap<K, Vec<V>>
where Self: Sized + Iterator<Item = V>, K: Hash + Eq, F: FnMut(&V) -> K,

Return a HashMap of keys mapped to Vecs of values. The key is specified in the closure. The values are taken from the input iterator. Read more
Sourceยง

fn into_grouping_map<K, V>(self) -> GroupingMap<Self>
where Self: Sized + Iterator<Item = (K, V)>, K: Hash + Eq,

Constructs a GroupingMap to be used later with one of the efficient group-and-fold operations it allows to perform. Read more
Sourceยง

fn into_grouping_map_by<K, V, F>( self, key_mapper: F, ) -> GroupingMap<MapSpecialCase<Self, GroupingMapFn<F>>>
where Self: Sized + Iterator<Item = V>, K: Hash + Eq, F: FnMut(&V) -> K,

Constructs a GroupingMap to be used later with one of the efficient group-and-fold operations it allows to perform. Read more
Sourceยง

fn min_set(self) -> Vec<Self::Item>
where Self: Sized, Self::Item: Ord,

Return all minimum elements of an iterator. Read more
Sourceยง

fn min_set_by<F>(self, compare: F) -> Vec<Self::Item>
where Self: Sized, F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Return all minimum elements of an iterator, as determined by the specified function. Read more
Sourceยง

fn min_set_by_key<K, F>(self, key: F) -> Vec<Self::Item>
where Self: Sized, K: Ord, F: FnMut(&Self::Item) -> K,

Return all minimum elements of an iterator, as determined by the specified function. Read more
Sourceยง

fn max_set(self) -> Vec<Self::Item>
where Self: Sized, Self::Item: Ord,

Return all maximum elements of an iterator. Read more
Sourceยง

fn max_set_by<F>(self, compare: F) -> Vec<Self::Item>
where Self: Sized, F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Return all maximum elements of an iterator, as determined by the specified function. Read more
Sourceยง

fn max_set_by_key<K, F>(self, key: F) -> Vec<Self::Item>
where Self: Sized, K: Ord, F: FnMut(&Self::Item) -> K,

Return all maximum elements of an iterator, as determined by the specified function. Read more
Sourceยง

fn minmax(self) -> MinMaxResult<Self::Item>
where Self: Sized, Self::Item: PartialOrd,

Return the minimum and maximum elements in the iterator. Read more
Sourceยง

fn minmax_by_key<K, F>(self, key: F) -> MinMaxResult<Self::Item>
where Self: Sized, K: PartialOrd, F: FnMut(&Self::Item) -> K,

Return the minimum and maximum element of an iterator, as determined by the specified function. Read more
Sourceยง

fn minmax_by<F>(self, compare: F) -> MinMaxResult<Self::Item>
where Self: Sized, F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Return the minimum and maximum element of an iterator, as determined by the specified comparison function. Read more
Sourceยง

fn position_max(self) -> Option<usize>
where Self: Sized, Self::Item: Ord,

Return the position of the maximum element in the iterator. Read more
Sourceยง

fn position_max_by_key<K, F>(self, key: F) -> Option<usize>
where Self: Sized, K: Ord, F: FnMut(&Self::Item) -> K,

Return the position of the maximum element in the iterator, as determined by the specified function. Read more
Sourceยง

fn position_max_by<F>(self, compare: F) -> Option<usize>
where Self: Sized, F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Return the position of the maximum element in the iterator, as determined by the specified comparison function. Read more
Sourceยง

fn position_min(self) -> Option<usize>
where Self: Sized, Self::Item: Ord,

Return the position of the minimum element in the iterator. Read more
Sourceยง

fn position_min_by_key<K, F>(self, key: F) -> Option<usize>
where Self: Sized, K: Ord, F: FnMut(&Self::Item) -> K,

Return the position of the minimum element in the iterator, as determined by the specified function. Read more
Sourceยง

fn position_min_by<F>(self, compare: F) -> Option<usize>
where Self: Sized, F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Return the position of the minimum element in the iterator, as determined by the specified comparison function. Read more
Sourceยง

fn position_minmax(self) -> MinMaxResult<usize>
where Self: Sized, Self::Item: PartialOrd,

Return the positions of the minimum and maximum elements in the iterator. Read more
Sourceยง

fn position_minmax_by_key<K, F>(self, key: F) -> MinMaxResult<usize>
where Self: Sized, K: PartialOrd, F: FnMut(&Self::Item) -> K,

Return the postions of the minimum and maximum elements of an iterator, as determined by the specified function. Read more
Sourceยง

fn position_minmax_by<F>(self, compare: F) -> MinMaxResult<usize>
where Self: Sized, F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Return the postions of the minimum and maximum elements of an iterator, as determined by the specified comparison function. Read more
Sourceยง

fn exactly_one(self) -> Result<Self::Item, ExactlyOneError<Self>>
where Self: Sized,

If the iterator yields exactly one element, that element will be returned, otherwise an error will be returned containing an iterator that has the same output as the input iterator. Read more
Sourceยง

fn at_most_one(self) -> Result<Option<Self::Item>, ExactlyOneError<Self>>
where Self: Sized,

If the iterator yields no elements, Ok(None) will be returned. If the iterator yields exactly one element, that element will be returned, otherwise an error will be returned containing an iterator that has the same output as the input iterator. Read more
Sourceยง

fn multipeek(self) -> MultiPeek<Self> โ“˜
where Self: Sized,

An iterator adaptor that allows the user to peek at multiple .next() values without advancing the base iterator. Read more
Sourceยง

fn counts(self) -> HashMap<Self::Item, usize>
where Self: Sized, Self::Item: Eq + Hash,

Collect the items in this iterator and return a HashMap which contains each item that appears in the iterator and the number of times it appears. Read more
Sourceยง

fn counts_by<K, F>(self, f: F) -> HashMap<K, usize>
where Self: Sized, K: Eq + Hash, F: FnMut(Self::Item) -> K,

Collect the items in this iterator and return a HashMap which contains each item that appears in the iterator and the number of times it appears, determining identity using a keying function. Read more
Sourceยง

fn multiunzip<FromI>(self) -> FromI
where Self: Sized + MultiUnzip<FromI>,

Converts an iterator of tuples into a tuple of containers. Read more
Sourceยง

fn try_len(&self) -> Result<usize, (usize, Option<usize>)>

Returns the length of the iterator if one exists. Otherwise return self.size_hint(). Read more
Sourceยง

impl<T> Itertools for T
where T: Iterator + ?Sized,

Sourceยง

fn interleave<J>( self, other: J, ) -> Interleave<Self, <J as IntoIterator>::IntoIter> โ“˜
where J: IntoIterator<Item = Self::Item>, Self: Sized,

Alternate elements from two iterators until both have run out. Read more
Sourceยง

fn interleave_shortest<J>( self, other: J, ) -> InterleaveShortest<Self, <J as IntoIterator>::IntoIter> โ“˜
where J: IntoIterator<Item = Self::Item>, Self: Sized,

Alternate elements from two iterators until at least one of them has run out. Read more
Sourceยง

fn intersperse( self, element: Self::Item, ) -> IntersperseWith<Self, IntersperseElementSimple<Self::Item>> โ“˜
where Self: Sized, Self::Item: Clone,

An iterator adaptor to insert a particular value between each element of the adapted iterator. Read more
Sourceยง

fn intersperse_with<F>(self, element: F) -> IntersperseWith<Self, F> โ“˜
where Self: Sized, F: FnMut() -> Self::Item,

An iterator adaptor to insert a particular value created by a function between each element of the adapted iterator. Read more
Sourceยง

fn get<R>(self, index: R) -> <R as IteratorIndex<Self>>::Output
where Self: Sized, R: IteratorIndex<Self>,

Returns an iterator over a subsection of the iterator. Read more
Sourceยง

fn zip_longest<J>( self, other: J, ) -> ZipLongest<Self, <J as IntoIterator>::IntoIter> โ“˜
where J: IntoIterator, Self: Sized,

Create an iterator which iterates over both this and the specified iterator simultaneously, yielding pairs of two optional elements. Read more
Sourceยง

fn zip_eq<J>(self, other: J) -> ZipEq<Self, <J as IntoIterator>::IntoIter> โ“˜
where J: IntoIterator, Self: Sized,

Create an iterator which iterates over both this and the specified iterator simultaneously, yielding pairs of elements. Read more
Sourceยง

fn batching<B, F>(self, f: F) -> Batching<Self, F> โ“˜
where F: FnMut(&mut Self) -> Option<B>, Self: Sized,

A โ€œmeta iterator adaptorโ€. Its closure receives a reference to the iterator and may pick off as many elements as it likes, to produce the next iterator element. Read more
Sourceยง

fn tuple_windows<T>(self) -> TupleWindows<Self, T> โ“˜
where Self: Sized + Iterator<Item = <T as TupleCollect>::Item>, T: HomogeneousTuple, <T as TupleCollect>::Item: Clone,

Return an iterator over all contiguous windows producing tuples of a specific size (up to 12). Read more
Sourceยง

fn circular_tuple_windows<T>(self) -> CircularTupleWindows<Self, T> โ“˜
where Self: Sized + Clone + Iterator<Item = <T as TupleCollect>::Item> + ExactSizeIterator, T: TupleCollect + Clone, <T as TupleCollect>::Item: Clone,

Return an iterator over all windows, wrapping back to the first elements when the window would otherwise exceed the length of the iterator, producing tuples of a specific size (up to 12). Read more
Sourceยง

fn tuples<T>(self) -> Tuples<Self, T> โ“˜
where Self: Sized + Iterator<Item = <T as TupleCollect>::Item>, T: HomogeneousTuple,

Return an iterator that groups the items in tuples of a specific size (up to 12). Read more
Sourceยง

fn map_into<R>(self) -> MapSpecialCase<Self, MapSpecialCaseFnInto<R>>
where Self: Sized, Self::Item: Into<R>,

Convert each item of the iterator using the Into trait. Read more
Sourceยง

fn map_ok<F, T, U, E>(self, f: F) -> MapSpecialCase<Self, MapSpecialCaseFnOk<F>>
where Self: Sized + Iterator<Item = Result<T, E>>, F: FnMut(T) -> U,

Return an iterator adaptor that applies the provided closure to every Result::Ok value. Result::Err values are unchanged. Read more
Sourceยง

fn filter_ok<F, T, E>(self, f: F) -> FilterOk<Self, F> โ“˜
where Self: Sized + Iterator<Item = Result<T, E>>, F: FnMut(&T) -> bool,

Return an iterator adaptor that filters every Result::Ok value with the provided closure. Result::Err values are unchanged. Read more
Sourceยง

fn filter_map_ok<F, T, U, E>(self, f: F) -> FilterMapOk<Self, F> โ“˜
where Self: Sized + Iterator<Item = Result<T, E>>, F: FnMut(T) -> Option<U>,

Return an iterator adaptor that filters and transforms every Result::Ok value with the provided closure. Result::Err values are unchanged. Read more
Sourceยง

fn flatten_ok<T, E>(self) -> FlattenOk<Self, T, E> โ“˜
where Self: Sized + Iterator<Item = Result<T, E>>, T: IntoIterator,

Return an iterator adaptor that flattens every Result::Ok value into a series of Result::Ok values. Result::Err values are unchanged. Read more
Sourceยง

fn process_results<F, T, E, R>(self, processor: F) -> Result<R, E>
where Self: Sized + Iterator<Item = Result<T, E>>, F: FnOnce(ProcessResults<'_, Self, E>) -> R,

โ€œLiftโ€ a function of the values of the current iterator so as to process an iterator of Result values instead. Read more
Sourceยง

fn merge<J>( self, other: J, ) -> MergeBy<Self, <J as IntoIterator>::IntoIter, MergeLte> โ“˜
where Self: Sized, Self::Item: PartialOrd, J: IntoIterator<Item = Self::Item>,

Return an iterator adaptor that merges the two base iterators in ascending order. If both base iterators are sorted (ascending), the result is sorted. Read more
Sourceยง

fn merge_by<J, F>( self, other: J, is_first: F, ) -> MergeBy<Self, <J as IntoIterator>::IntoIter, F> โ“˜
where Self: Sized, J: IntoIterator<Item = Self::Item>, F: FnMut(&Self::Item, &Self::Item) -> bool,

Return an iterator adaptor that merges the two base iterators in order. This is much like .merge() but allows for a custom ordering. Read more
Sourceยง

fn merge_join_by<J, F, T>( self, other: J, cmp_fn: F, ) -> MergeBy<Self, <J as IntoIterator>::IntoIter, MergeFuncLR<F, <F as FuncLR<Self::Item, <<J as IntoIterator>::IntoIter as Iterator>::Item>>::T>> โ“˜
where J: IntoIterator, F: FnMut(&Self::Item, &<J as IntoIterator>::Item) -> T, Self: Sized,

Create an iterator that merges items from both this and the specified iterator in ascending order. Read more
Sourceยง

fn cartesian_product<J>( self, other: J, ) -> Product<Self, <J as IntoIterator>::IntoIter> โ“˜
where Self: Sized, Self::Item: Clone, J: IntoIterator, <J as IntoIterator>::IntoIter: Clone,

Return an iterator adaptor that iterates over the cartesian product of the element sets of two iterators self and J. Read more
Sourceยง

fn coalesce<F>(self, f: F) -> CoalesceBy<Self, F, NoCount>
where Self: Sized, F: FnMut(Self::Item, Self::Item) -> Result<Self::Item, (Self::Item, Self::Item)>,

Return an iterator adaptor that uses the passed-in closure to optionally merge together consecutive elements. Read more
Sourceยง

fn dedup(self) -> CoalesceBy<Self, DedupPred2CoalescePred<DedupEq>, NoCount>
where Self: Sized, Self::Item: PartialEq,

Remove duplicates from sections of consecutive identical elements. If the iterator is sorted, all elements will be unique. Read more
Sourceยง

fn dedup_by<Cmp>( self, cmp: Cmp, ) -> CoalesceBy<Self, DedupPred2CoalescePred<Cmp>, NoCount>
where Self: Sized, Cmp: FnMut(&Self::Item, &Self::Item) -> bool,

Remove duplicates from sections of consecutive identical elements, determining equality using a comparison function. If the iterator is sorted, all elements will be unique. Read more
Sourceยง

fn dedup_with_count( self, ) -> CoalesceBy<Self, DedupPredWithCount2CoalescePred<DedupEq>, WithCount>
where Self: Sized,

Remove duplicates from sections of consecutive identical elements, while keeping a count of how many repeated elements were present. If the iterator is sorted, all elements will be unique. Read more
Sourceยง

fn dedup_by_with_count<Cmp>( self, cmp: Cmp, ) -> CoalesceBy<Self, DedupPredWithCount2CoalescePred<Cmp>, WithCount>
where Self: Sized, Cmp: FnMut(&Self::Item, &Self::Item) -> bool,

Remove duplicates from sections of consecutive identical elements, while keeping a count of how many repeated elements were present. This will determine equality using a comparison function. If the iterator is sorted, all elements will be unique. Read more
Sourceยง

fn peeking_take_while<F>(&mut self, accept: F) -> PeekingTakeWhile<'_, Self, F> โ“˜
where Self: Sized + PeekingNext, F: FnMut(&Self::Item) -> bool,

Return an iterator adaptor that borrows from this iterator and takes items while the closure accept returns true. Read more
Sourceยง

fn take_while_ref<F>(&mut self, accept: F) -> TakeWhileRef<'_, Self, F> โ“˜
where Self: Clone, F: FnMut(&Self::Item) -> bool,

Return an iterator adaptor that borrows from a Clone-able iterator to only pick off elements while the predicate accept returns true. Read more
Sourceยง

fn take_while_inclusive<F>(self, accept: F) -> TakeWhileInclusive<Self, F> โ“˜
where Self: Sized, F: FnMut(&Self::Item) -> bool,

Returns an iterator adaptor that consumes elements while the given predicate is true, including the element for which the predicate first returned false. Read more
Sourceยง

fn while_some<A>(self) -> WhileSome<Self> โ“˜
where Self: Sized + Iterator<Item = Option<A>>,

Return an iterator adaptor that filters Option<A> iterator elements and produces A. Stops on the first None encountered. Read more
Sourceยง

fn tuple_combinations<T>(self) -> TupleCombinations<Self, T> โ“˜
where Self: Sized + Clone, Self::Item: Clone, T: HasCombination<Self>,

Return an iterator adaptor that iterates over the combinations of the elements from an iterator. Read more
Sourceยง

fn pad_using<F>(self, min: usize, f: F) -> PadUsing<Self, F> โ“˜
where Self: Sized, F: FnMut(usize) -> Self::Item,

Return an iterator adaptor that pads the sequence to a minimum length of min by filling missing elements using a closure f. Read more
Sourceยง

fn with_position(self) -> WithPosition<Self> โ“˜
where Self: Sized,

Return an iterator adaptor that combines each element with a Position to ease special-case handling of the first or last elements. Read more
Sourceยง

fn positions<P>(self, predicate: P) -> Positions<Self, P> โ“˜
where Self: Sized, P: FnMut(Self::Item) -> bool,

Return an iterator adaptor that yields the indices of all elements satisfying a predicate, counted from the start of the iterator. Read more
Sourceยง

fn update<F>(self, updater: F) -> Update<Self, F> โ“˜
where Self: Sized, F: FnMut(&mut Self::Item),

Return an iterator adaptor that applies a mutating function to each element before yielding it. Read more
Sourceยง

fn next_tuple<T>(&mut self) -> Option<T>
where Self: Sized + Iterator<Item = <T as TupleCollect>::Item>, T: HomogeneousTuple,

Advances the iterator and returns the next items grouped in a tuple of a specific size (up to 12). Read more
Sourceยง

fn collect_tuple<T>(self) -> Option<T>
where Self: Sized + Iterator<Item = <T as TupleCollect>::Item>, T: HomogeneousTuple,

Collects all items from the iterator into a tuple of a specific size (up to 12). Read more
Sourceยง

fn find_position<P>(&mut self, pred: P) -> Option<(usize, Self::Item)>
where P: FnMut(&Self::Item) -> bool,

Find the position and value of the first element satisfying a predicate. Read more
Sourceยง

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

Find the value of the first element satisfying a predicate or return the last element, if any. Read more
Sourceยง

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

Find the value of the first element satisfying a predicate or return the first element, if any. Read more
Sourceยง

fn contains<Q>(&mut self, query: &Q) -> bool
where Self: Sized, Self::Item: Borrow<Q>, Q: PartialEq,

Returns true if the given item is present in this iterator. Read more
Sourceยง

fn all_equal(&mut self) -> bool
where Self: Sized, Self::Item: PartialEq,

Check whether all elements compare equal. Read more
Sourceยง

fn all_equal_value( &mut self, ) -> Result<Self::Item, Option<(Self::Item, Self::Item)>>
where Self: Sized, Self::Item: PartialEq,

If there are elements and they are all equal, return a single copy of that element. If there are no elements, return an Error containing None. If there are elements and they are not all equal, return a tuple containing the first two non-equal elements found. Read more
Sourceยง

fn dropping(self, n: usize) -> Self
where Self: Sized,

Consume the first n elements from the iterator eagerly, and return the same iterator again. Read more
Sourceยง

fn dropping_back(self, n: usize) -> Self
where Self: Sized + DoubleEndedIterator,

Consume the last n elements from the iterator eagerly, and return the same iterator again. Read more
Sourceยง

fn concat(self) -> Self::Item
where Self: Sized, Self::Item: Extend<<Self::Item as IntoIterator>::Item> + IntoIterator + Default,

Combine all an iteratorโ€™s elements into one element by using Extend. Read more
Sourceยง

fn try_collect<T, U, E>(self) -> Result<U, E>
where Self: Sized + Iterator<Item = Result<T, E>>, Result<U, E>: FromIterator<Result<T, E>>,

.try_collect() is more convenient way of writing .collect::<Result<_, _>>() Read more
Sourceยง

fn set_from<'a, A, J>(&mut self, from: J) -> usize
where A: 'a, Self: Iterator<Item = &'a mut A>, J: IntoIterator<Item = A>,

Assign to each reference in self from the from iterator, stopping at the shortest of the two iterators. Read more
Sourceยง

fn format(self, sep: &str) -> Format<'_, Self>
where Self: Sized,

Format all iterator elements, separated by sep. Read more
Sourceยง

fn format_with<F>(self, sep: &str, format: F) -> FormatWith<'_, Self, F>
where Self: Sized, F: FnMut(Self::Item, &mut dyn FnMut(&dyn Display) -> Result<(), Error>) -> Result<(), Error>,

Format all iterator elements, separated by sep. Read more
Sourceยง

fn fold_ok<A, E, B, F>(&mut self, start: B, f: F) -> Result<B, E>
where Self: Iterator<Item = Result<A, E>>, F: FnMut(B, A) -> B,

Fold Result values from an iterator. Read more
Sourceยง

fn fold_options<A, B, F>(&mut self, start: B, f: F) -> Option<B>
where Self: Iterator<Item = Option<A>>, F: FnMut(B, A) -> B,

Fold Option values from an iterator. Read more
Sourceยง

fn fold1<F>(self, f: F) -> Option<Self::Item>
where F: FnMut(Self::Item, Self::Item) -> Self::Item, Self: Sized,

๐Ÿ‘ŽDeprecated since 0.10.2: Use Iterator::reduce instead
Accumulator of the elements in the iterator. Read more
Sourceยง

fn tree_reduce<F>(self, f: F) -> Option<Self::Item>
where F: FnMut(Self::Item, Self::Item) -> Self::Item, Self: Sized,

Accumulate the elements in the iterator in a tree-like manner. Read more
Sourceยง

fn tree_fold1<F>(self, f: F) -> Option<Self::Item>
where F: FnMut(Self::Item, Self::Item) -> Self::Item, Self: Sized,

๐Ÿ‘ŽDeprecated since 0.13.0: Use .tree_reduce() instead
Sourceยง

fn fold_while<B, F>(&mut self, init: B, f: F) -> FoldWhile<B>
where Self: Sized, F: FnMut(B, Self::Item) -> FoldWhile<B>,

An iterator method that applies a function, producing a single, final value. Read more
Sourceยง

fn sum1<S>(self) -> Option<S>
where Self: Sized, S: Sum<Self::Item>,

Iterate over the entire iterator and add all the elements. Read more
Sourceยง

fn product1<P>(self) -> Option<P>
where Self: Sized, P: Product<Self::Item>,

Iterate over the entire iterator and multiply all the elements. Read more
Sourceยง

fn partition_map<A, B, F, L, R>(self, predicate: F) -> (A, B)
where Self: Sized, F: FnMut(Self::Item) -> Either<L, R>, A: Default + Extend<L>, B: Default + Extend<R>,

Collect all iterator elements into one of two partitions. Unlike Iterator::partition, each partition may have a distinct type. Read more
Sourceยง

fn partition_result<A, B, T, E>(self) -> (A, B)
where Self: Sized + Iterator<Item = Result<T, E>>, A: Default + Extend<T>, B: Default + Extend<E>,

Partition a sequence of Results into one list of all the Ok elements and another list of all the Err elements. Read more
Sourceยง

fn minmax(self) -> MinMaxResult<Self::Item>
where Self: Sized, Self::Item: PartialOrd,

Return the minimum and maximum elements in the iterator. Read more
Sourceยง

fn minmax_by_key<K, F>(self, key: F) -> MinMaxResult<Self::Item>
where Self: Sized, K: PartialOrd, F: FnMut(&Self::Item) -> K,

Return the minimum and maximum element of an iterator, as determined by the specified function. Read more
Sourceยง

fn minmax_by<F>(self, compare: F) -> MinMaxResult<Self::Item>
where Self: Sized, F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Return the minimum and maximum element of an iterator, as determined by the specified comparison function. Read more
Sourceยง

fn position_max(self) -> Option<usize>
where Self: Sized, Self::Item: Ord,

Return the position of the maximum element in the iterator. Read more
Sourceยง

fn position_max_by_key<K, F>(self, key: F) -> Option<usize>
where Self: Sized, K: Ord, F: FnMut(&Self::Item) -> K,

Return the position of the maximum element in the iterator, as determined by the specified function. Read more
Sourceยง

fn position_max_by<F>(self, compare: F) -> Option<usize>
where Self: Sized, F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Return the position of the maximum element in the iterator, as determined by the specified comparison function. Read more
Sourceยง

fn position_min(self) -> Option<usize>
where Self: Sized, Self::Item: Ord,

Return the position of the minimum element in the iterator. Read more
Sourceยง

fn position_min_by_key<K, F>(self, key: F) -> Option<usize>
where Self: Sized, K: Ord, F: FnMut(&Self::Item) -> K,

Return the position of the minimum element in the iterator, as determined by the specified function. Read more
Sourceยง

fn position_min_by<F>(self, compare: F) -> Option<usize>
where Self: Sized, F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Return the position of the minimum element in the iterator, as determined by the specified comparison function. Read more
Sourceยง

fn position_minmax(self) -> MinMaxResult<usize>
where Self: Sized, Self::Item: PartialOrd,

Return the positions of the minimum and maximum elements in the iterator. Read more
Sourceยง

fn position_minmax_by_key<K, F>(self, key: F) -> MinMaxResult<usize>
where Self: Sized, K: PartialOrd, F: FnMut(&Self::Item) -> K,

Return the postions of the minimum and maximum elements of an iterator, as determined by the specified function. Read more
Sourceยง

fn position_minmax_by<F>(self, compare: F) -> MinMaxResult<usize>
where Self: Sized, F: FnMut(&Self::Item, &Self::Item) -> Ordering,

Return the postions of the minimum and maximum elements of an iterator, as determined by the specified comparison function. Read more
Sourceยง

fn exactly_one(self) -> Result<Self::Item, ExactlyOneError<Self>>
where Self: Sized,

If the iterator yields exactly one element, that element will be returned, otherwise an error will be returned containing an iterator that has the same output as the input iterator. Read more
Sourceยง

fn at_most_one(self) -> Result<Option<Self::Item>, ExactlyOneError<Self>>
where Self: Sized,

If the iterator yields no elements, Ok(None) will be returned. If the iterator yields exactly one element, that element will be returned, otherwise an error will be returned containing an iterator that has the same output as the input iterator. Read more
Sourceยง

fn multiunzip<FromI>(self) -> FromI
where Self: Sized + MultiUnzip<FromI>,

Converts an iterator of tuples into a tuple of containers. Read more
Sourceยง

fn try_len(&self) -> Result<usize, (usize, Option<usize>)>

Returns the length of the iterator if one exists. Otherwise return self.size_hint(). Read more
Sourceยง

impl<T> Pointable for T

Sourceยง

const ALIGN: usize = _

The alignment of pointer.
Sourceยง

type Init = T

The type for initializers.
Sourceยง

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Sourceยง

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Sourceยง

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Sourceยง

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Sourceยง

impl<T> QuickClone<T> for T
where T: Clone,

Sourceยง

fn C(&self) -> T

Sourceยง

impl<T> QuickToOwned for T
where T: ToOwned,

Sourceยง

type Owned = <T as ToOwned>::Owned

Sourceยง

fn O(&self) -> <T as QuickToOwned>::Owned

Sourceยง

impl<T> Same for T

Sourceยง

type Output = T

Should always be Self
Sourceยง

impl<T> ToOwned for T
where T: Clone,

Sourceยง

type Owned = T

The resulting type after obtaining ownership.
Sourceยง

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Sourceยง

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Sourceยง

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Sourceยง

type Error = Infallible

The type returned in the event of a conversion error.
Sourceยง

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Sourceยง

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Sourceยง

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Sourceยง

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Sourceยง

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Sourceยง

fn vzip(self) -> V

Sourceยง

impl<T> WithSubscriber for T

Sourceยง

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> โ“˜
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Sourceยง

fn with_current_subscriber(self) -> WithDispatch<Self> โ“˜

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Sourceยง

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Sourceยง

impl<T> ErasedDestructor for T
where T: 'static,

Sourceยง

impl<T> MaybeSendSync for T