pub struct Range<Idx> {
pub start: Idx,
pub end: Idx,
}
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
new_range_api
)The lower bound of the range (inclusive).
end: Idx
new_range_api
)The upper bound of the range (exclusive).
Implementationsยง
Sourceยงimpl<Idx> Range<Idx>where
Idx: PartialOrd,
impl<Idx> Range<Idx>where
Idx: PartialOrd,
1.35.0 ยท Sourcepub fn contains<U>(&self, item: &U) -> bool
pub fn contains<U>(&self, item: &U) -> bool
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 ยท Sourcepub fn is_empty(&self) -> bool
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,
impl<A> Arbitrary for Range<A>where
A: PartialOrd + Arbitrary,
Sourceยงtype Parameters = (<A as Arbitrary>::Parameters, <A as Arbitrary>::Parameters)
type Parameters = (<A as Arbitrary>::Parameters, <A as Arbitrary>::Parameters)
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>>
type Strategy = Map<<(A, A) as Arbitrary>::Strategy, fn(_: (A, A)) -> Range<A>>
Strategy
used to generate values of type Self
.Sourceยงfn arbitrary_with(
args: <Range<A> as Arbitrary>::Parameters,
) -> <Range<A> as Arbitrary>::Strategy โ
fn arbitrary_with( args: <Range<A> as Arbitrary>::Parameters, ) -> <Range<A> as Arbitrary>::Strategy โ
Sourceยงimpl<A> ArbitraryF1<A> for Range<A>where
A: Debug + PartialOrd,
impl<A> ArbitraryF1<A> for Range<A>where
A: Debug + PartialOrd,
Sourceยงtype Parameters = ()
type Parameters = ()
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,
fn lift1_with<S>(
base: S,
_args: <Range<A> as ArbitraryF1<A>>::Parameters,
) -> BoxedStrategy<Range<A>>where
S: Strategy<Value = A> + 'static,
Sourceยงimpl<C1, C2> ContainsToken<C1> for Range<C2>
impl<C1, C2> ContainsToken<C1> for Range<C2>
Sourceยงfn contains_token(&self, token: C1) -> bool
fn contains_token(&self, token: C1) -> bool
Sourceยงimpl<'de, Idx> Deserialize<'de> for Range<Idx>where
Idx: Deserialize<'de>,
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>,
fn deserialize<D>(
deserializer: D,
) -> Result<Range<Idx>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
1.0.0 ยท Sourceยงimpl<A> DoubleEndedIterator for Range<A>where
A: Step,
impl<A> DoubleEndedIterator for Range<A>where
A: Step,
Sourceยงfn next_back(&mut self) -> Option<A>
fn next_back(&mut self) -> Option<A>
Sourceยงfn nth_back(&mut self, n: usize) -> Option<A>
fn nth_back(&mut self, n: usize) -> Option<A>
n
th element from the end of the iterator. Read moreSourceยงfn advance_back_by(&mut self, n: usize) -> Result<(), NonZero<usize>>
fn advance_back_by(&mut self, n: usize) -> Result<(), NonZero<usize>>
iter_advance_by
)n
elements. Read more1.27.0 ยท Sourceยงfn try_rfold<B, F, R>(&mut self, init: B, f: F) -> R
fn try_rfold<B, F, R>(&mut self, init: B, f: F) -> R
Iterator::try_fold()
: it takes
elements starting from the back of the iterator. Read more1.0.0 ยท Sourceยงimpl ExactSizeIterator for Range<i16>
impl ExactSizeIterator for Range<i16>
1.0.0 ยท Sourceยงimpl ExactSizeIterator for Range<i32>
impl ExactSizeIterator for Range<i32>
1.0.0 ยท Sourceยงimpl ExactSizeIterator for Range<i8>
impl ExactSizeIterator for Range<i8>
1.0.0 ยท Sourceยงimpl ExactSizeIterator for Range<isize>
impl ExactSizeIterator for Range<isize>
1.0.0 ยท Sourceยงimpl ExactSizeIterator for Range<u16>
impl ExactSizeIterator for Range<u16>
1.0.0 ยท Sourceยงimpl ExactSizeIterator for Range<u32>
impl ExactSizeIterator for Range<u32>
1.0.0 ยท Sourceยงimpl ExactSizeIterator for Range<u8>
impl ExactSizeIterator for Range<u8>
1.0.0 ยท Sourceยงimpl ExactSizeIterator for Range<usize>
impl ExactSizeIterator for Range<usize>
Sourceยงimpl From<Range<i64>> for ValueParser
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ยงimpl From<Range<usize>> for SizeRange
impl From<Range<usize>> for SizeRange
Given low .. high
, then a size range [low, high)
is the result.
Sourceยงimpl<T> IntoParallelIterator for Range<T>where
Iter<T>: ParallelIterator,
impl<T> IntoParallelIterator for Range<T>where
Iter<T>: ParallelIterator,
Implemented for ranges of all primitive integer types and char
.
Sourceยงtype Item = <Iter<T> as ParallelIterator>::Item
type Item = <Iter<T> as ParallelIterator>::Item
Sourceยงfn into_par_iter(self) -> <Range<T> as IntoParallelIterator>::Iter โ
fn into_par_iter(self) -> <Range<T> as IntoParallelIterator>::Iter โ
self
into a parallel iterator. Read more1.0.0 ยท Sourceยงimpl<A> Iterator for Range<A>where
A: Step,
impl<A> Iterator for Range<A>where
A: Step,
Sourceยงfn size_hint(&self) -> (usize, Option<usize>)
fn size_hint(&self) -> (usize, Option<usize>)
Sourceยงfn count(self) -> usize
fn count(self) -> usize
Sourceยงfn advance_by(&mut self, n: usize) -> Result<(), NonZero<usize>>
fn advance_by(&mut self, n: usize) -> Result<(), NonZero<usize>>
iter_advance_by
)n
elements. Read moreSourceยงfn next_chunk<const N: usize>(
&mut self,
) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>where
Self: Sized,
fn next_chunk<const N: usize>(
&mut self,
) -> Result<[Self::Item; N], IntoIter<Self::Item, N>>where
Self: Sized,
iter_next_chunk
)N
values. Read more1.28.0 ยท Sourceยงfn step_by(self, step: usize) -> StepBy<Self> โwhere
Self: Sized,
fn step_by(self, step: usize) -> StepBy<Self> โwhere
Self: Sized,
1.0.0 ยท Sourceยงfn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter> โ
fn chain<U>(self, other: U) -> Chain<Self, <U as IntoIterator>::IntoIter> โ
1.0.0 ยท Sourceยงfn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter> โwhere
Self: Sized,
U: IntoIterator,
fn zip<U>(self, other: U) -> Zip<Self, <U as IntoIterator>::IntoIter> โwhere
Self: Sized,
U: IntoIterator,
Sourceยงfn intersperse(self, separator: Self::Item) -> Intersperse<Self> โ
fn intersperse(self, separator: Self::Item) -> Intersperse<Self> โ
iter_intersperse
)separator
between adjacent
items of the original iterator. Read moreSourceยงfn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G> โ
fn intersperse_with<G>(self, separator: G) -> IntersperseWith<Self, G> โ
iter_intersperse
)separator
between adjacent items of the original iterator. Read more1.0.0 ยท Sourceยงfn map<B, F>(self, f: F) -> Map<Self, F> โ
fn map<B, F>(self, f: F) -> Map<Self, F> โ
1.21.0 ยท Sourceยงfn for_each<F>(self, f: F)
fn for_each<F>(self, f: F)
1.0.0 ยท Sourceยงfn filter<P>(self, predicate: P) -> Filter<Self, P> โ
fn filter<P>(self, predicate: P) -> Filter<Self, P> โ
1.0.0 ยท Sourceยงfn filter_map<B, F>(self, f: F) -> FilterMap<Self, F> โ
fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F> โ
1.0.0 ยท Sourceยงfn enumerate(self) -> Enumerate<Self> โwhere
Self: Sized,
fn enumerate(self) -> Enumerate<Self> โwhere
Self: Sized,
1.0.0 ยท Sourceยงfn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P> โ
fn skip_while<P>(self, predicate: P) -> SkipWhile<Self, P> โ
1.0.0 ยท Sourceยงfn take_while<P>(self, predicate: P) -> TakeWhile<Self, P> โ
fn take_while<P>(self, predicate: P) -> TakeWhile<Self, P> โ
1.57.0 ยท Sourceยงfn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P> โ
fn map_while<B, P>(self, predicate: P) -> MapWhile<Self, P> โ
1.0.0 ยท Sourceยงfn skip(self, n: usize) -> Skip<Self> โwhere
Self: Sized,
fn skip(self, n: usize) -> Skip<Self> โwhere
Self: Sized,
n
elements. Read more1.0.0 ยท Sourceยงfn take(self, n: usize) -> Take<Self> โwhere
Self: Sized,
fn take(self, n: usize) -> Take<Self> โwhere
Self: Sized,
n
elements, or fewer
if the underlying iterator ends sooner. Read more1.0.0 ยท Sourceยงfn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F> โ
fn flat_map<U, F>(self, f: F) -> FlatMap<Self, U, F> โ
1.29.0 ยท Sourceยงfn flatten(self) -> Flatten<Self> โ
fn flatten(self) -> Flatten<Self> โ
Sourceยงfn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N> โ
fn map_windows<F, R, const N: usize>(self, f: F) -> MapWindows<Self, F, N> โ
iter_map_windows
)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 more1.0.0 ยท Sourceยงfn inspect<F>(self, f: F) -> Inspect<Self, F> โ
fn inspect<F>(self, f: F) -> Inspect<Self, F> โ
1.0.0 ยท Sourceยงfn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
fn by_ref(&mut self) -> &mut Selfwhere
Self: Sized,
Sourceยงfn try_collect<B>(
&mut self,
) -> <<Self::Item as Try>::Residual as Residual<B>>::TryType
fn try_collect<B>( &mut self, ) -> <<Self::Item as Try>::Residual as Residual<B>>::TryType
iterator_try_collect
)Sourceยงfn collect_into<E>(self, collection: &mut E) -> &mut E
fn collect_into<E>(self, collection: &mut E) -> &mut E
iter_collect_into
)1.0.0 ยท Sourceยงfn partition<B, F>(self, f: F) -> (B, B)
fn partition<B, F>(self, f: F) -> (B, B)
Sourceยงfn partition_in_place<'a, T, P>(self, predicate: P) -> usize
fn partition_in_place<'a, T, P>(self, predicate: P) -> usize
iter_partition_in_place
)true
precede all those that return false
.
Returns the number of true
elements found. Read moreSourceยงfn is_partitioned<P>(self, predicate: P) -> bool
fn is_partitioned<P>(self, predicate: P) -> bool
iter_is_partitioned
)true
precede all those that return false
. Read more1.27.0 ยท Sourceยงfn try_fold<B, F, R>(&mut self, init: B, f: F) -> R
fn try_fold<B, F, R>(&mut self, init: B, f: F) -> R
1.27.0 ยท Sourceยงfn try_for_each<F, R>(&mut self, f: F) -> R
fn try_for_each<F, R>(&mut self, f: F) -> R
1.0.0 ยท Sourceยงfn fold<B, F>(self, init: B, f: F) -> B
fn fold<B, F>(self, init: B, f: F) -> B
1.51.0 ยท Sourceยงfn reduce<F>(self, f: F) -> Option<Self::Item>
fn reduce<F>(self, f: F) -> Option<Self::Item>
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
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
iterator_try_reduce
)1.0.0 ยท Sourceยงfn all<F>(&mut self, f: F) -> bool
fn all<F>(&mut self, f: F) -> bool
1.0.0 ยท Sourceยงfn any<F>(&mut self, f: F) -> bool
fn any<F>(&mut self, f: F) -> bool
1.0.0 ยท Sourceยงfn find<P>(&mut self, predicate: P) -> Option<Self::Item>
fn find<P>(&mut self, predicate: P) -> Option<Self::Item>
1.30.0 ยท Sourceยงfn find_map<B, F>(&mut self, f: F) -> Option<B>
fn find_map<B, F>(&mut self, f: F) -> Option<B>
Sourceยงfn try_find<R>(
&mut self,
f: impl FnMut(&Self::Item) -> R,
) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryType
fn try_find<R>( &mut self, f: impl FnMut(&Self::Item) -> R, ) -> <<R as Try>::Residual as Residual<Option<Self::Item>>>::TryType
try_find
)1.0.0 ยท Sourceยงfn position<P>(&mut self, predicate: P) -> Option<usize>
fn position<P>(&mut self, predicate: P) -> Option<usize>
1.0.0 ยท Sourceยงfn rposition<P>(&mut self, predicate: P) -> Option<usize>
fn rposition<P>(&mut self, predicate: P) -> Option<usize>
1.6.0 ยท Sourceยงfn max_by_key<B, F>(self, f: F) -> Option<Self::Item>
fn max_by_key<B, F>(self, f: F) -> Option<Self::Item>
1.15.0 ยท Sourceยงfn max_by<F>(self, compare: F) -> Option<Self::Item>
fn max_by<F>(self, compare: F) -> Option<Self::Item>
1.6.0 ยท Sourceยงfn min_by_key<B, F>(self, f: F) -> Option<Self::Item>
fn min_by_key<B, F>(self, f: F) -> Option<Self::Item>
1.15.0 ยท Sourceยงfn min_by<F>(self, compare: F) -> Option<Self::Item>
fn min_by<F>(self, compare: F) -> Option<Self::Item>
1.0.0 ยท Sourceยงfn rev(self) -> Rev<Self> โwhere
Self: Sized + DoubleEndedIterator,
fn rev(self) -> Rev<Self> โwhere
Self: Sized + DoubleEndedIterator,
1.0.0 ยท Sourceยงfn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
fn unzip<A, B, FromA, FromB>(self) -> (FromA, FromB)
1.36.0 ยท Sourceยงfn copied<'a, T>(self) -> Copied<Self> โ
fn copied<'a, T>(self) -> Copied<Self> โ
Sourceยงfn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N> โwhere
Self: Sized,
fn array_chunks<const N: usize>(self) -> ArrayChunks<Self, N> โwhere
Self: Sized,
iter_array_chunks
)N
elements of the iterator at a time. Read more1.11.0 ยท Sourceยงfn product<P>(self) -> P
fn product<P>(self) -> P
Sourceยงfn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
fn cmp_by<I, F>(self, other: I, cmp: F) -> Ordering
iter_order_by
)Iterator
with those
of another with respect to the specified comparison function. Read more1.5.0 ยท Sourceยงfn partial_cmp<I>(self, other: I) -> Option<Ordering>
fn partial_cmp<I>(self, other: I) -> Option<Ordering>
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 moreSourceยง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>,
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>,
iter_order_by
)Iterator
with those
of another with respect to the specified comparison function. Read moreSourceยงfn eq_by<I, F>(self, other: I, eq: F) -> bool
fn eq_by<I, F>(self, other: I, eq: F) -> bool
iter_order_by
)1.5.0 ยท Sourceยงfn lt<I>(self, other: I) -> bool
fn lt<I>(self, other: I) -> bool
Iterator
are lexicographically
less than those of another. Read more1.5.0 ยท Sourceยงfn le<I>(self, other: I) -> bool
fn le<I>(self, other: I) -> bool
Iterator
are lexicographically
less or equal to those of another. Read more1.5.0 ยท Sourceยงfn gt<I>(self, other: I) -> bool
fn gt<I>(self, other: I) -> bool
Iterator
are lexicographically
greater than those of another. Read more1.5.0 ยท Sourceยงfn ge<I>(self, other: I) -> bool
fn ge<I>(self, other: I) -> bool
Iterator
are lexicographically
greater than or equal to those of another. Read more1.82.0 ยท Sourceยงfn is_sorted_by<F>(self, compare: F) -> bool
fn is_sorted_by<F>(self, compare: F) -> bool
1.82.0 ยท Sourceยงfn is_sorted_by_key<F, K>(self, f: F) -> bool
fn is_sorted_by_key<F, K>(self, f: F) -> bool
Sourceยงimpl NomRange<usize> for Range<usize>
impl NomRange<usize> for Range<usize>
Sourceยงtype Saturating = Range<usize>
type Saturating = Range<usize>
Sourceยงfn is_inverted(&self) -> bool
fn is_inverted(&self) -> bool
true
if the range is inverted.Sourceยงfn saturating_iter(&self) -> <Range<usize> as NomRange<usize>>::Saturating โ
fn saturating_iter(&self) -> <Range<usize> as NomRange<usize>>::Saturating โ
Sourceยงfn bounded_iter(&self) -> <Range<usize> as NomRange<usize>>::Bounded โ
fn bounded_iter(&self) -> <Range<usize> as NomRange<usize>>::Bounded โ
None
for all further elements.1.28.0 ยท Sourceยงimpl<T> RangeBounds<T> for Range<&T>
impl<T> RangeBounds<T> for Range<&T>
1.28.0 ยท Sourceยงimpl<T> RangeBounds<T> for Range<T>
impl<T> RangeBounds<T> for Range<T>
Sourceยงimpl<T> SampleRange<T> for Range<T>where
T: SampleUniform + PartialOrd,
impl<T> SampleRange<T> for Range<T>where
T: SampleUniform + PartialOrd,
Sourceยงimpl<T> SampleRange<T> for Range<T>where
T: SampleUniform + PartialOrd,
impl<T> SampleRange<T> for Range<T>where
T: SampleUniform + PartialOrd,
Sourceยงimpl<Idx> Serialize for Range<Idx>where
Idx: Serialize,
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,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
1.15.0 ยท Sourceยงimpl<T> SliceIndex<[T]> for Range<usize>
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ยงfn get(self, slice: &[T]) -> Option<&[T]>
fn get(self, slice: &[T]) -> Option<&[T]>
slice_index_methods
)Sourceยงfn get_mut(self, slice: &mut [T]) -> Option<&mut [T]>
fn get_mut(self, slice: &mut [T]) -> Option<&mut [T]>
slice_index_methods
)Sourceยงunsafe fn get_unchecked(self, slice: *const [T]) -> *const [T]
unsafe fn get_unchecked(self, slice: *const [T]) -> *const [T]
slice_index_methods
)Sourceยงunsafe fn get_unchecked_mut(self, slice: *mut [T]) -> *mut [T]
unsafe fn get_unchecked_mut(self, slice: *mut [T]) -> *mut [T]
slice_index_methods
)1.20.0 ยท Sourceยงimpl SliceIndex<str> for Range<usize>
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ยงfn get(self, slice: &str) -> Option<&<Range<usize> as SliceIndex<str>>::Output>
fn get(self, slice: &str) -> Option<&<Range<usize> as SliceIndex<str>>::Output>
slice_index_methods
)Sourceยงfn get_mut(
self,
slice: &mut str,
) -> Option<&mut <Range<usize> as SliceIndex<str>>::Output>
fn get_mut( self, slice: &mut str, ) -> Option<&mut <Range<usize> as SliceIndex<str>>::Output>
slice_index_methods
)Sourceยงunsafe fn get_unchecked(
self,
slice: *const str,
) -> *const <Range<usize> as SliceIndex<str>>::Output
unsafe fn get_unchecked( self, slice: *const str, ) -> *const <Range<usize> as SliceIndex<str>>::Output
slice_index_methods
)Sourceยงunsafe fn get_unchecked_mut(
self,
slice: *mut str,
) -> *mut <Range<usize> as SliceIndex<str>>::Output
unsafe fn get_unchecked_mut( self, slice: *mut str, ) -> *mut <Range<usize> as SliceIndex<str>>::Output
slice_index_methods
)Sourceยงimpl Strategy for Range<f32>
impl Strategy for Range<f32>
Sourceยงtype Tree = BinarySearch
type Tree = BinarySearch
Strategy
.Sourceยงtype Value = f32
type Value = f32
Sourceยงfn new_tree(
&self,
runner: &mut TestRunner,
) -> Result<<Range<f32> as Strategy>::Tree, Reason>
fn new_tree( &self, runner: &mut TestRunner, ) -> Result<<Range<f32> as Strategy>::Tree, Reason>
Sourceยงfn prop_map<O, F>(self, fun: F) -> Map<Self, F>
fn prop_map<O, F>(self, fun: F) -> Map<Self, F>
fun
. Read moreSourceยงfn prop_map_into<O>(self) -> MapInto<Self, O>
fn prop_map_into<O>(self) -> MapInto<Self, O>
Sourceยงfn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
fn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
fun
, which is additionally given a random number generator. Read moreSourceยงfn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
fn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
Sourceยงfn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
Sourceยงfn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
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 moreSourceยงfn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
fn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
fun
. Read moreSourceยงfn prop_filter_map<F, O>(
self,
whence: impl Into<Reason>,
fun: F,
) -> FilterMap<Self, F>
fn prop_filter_map<F, O>( self, whence: impl Into<Reason>, fun: F, ) -> FilterMap<Self, F>
fun
returns Some(value)
and rejects those where fun
returns None
. Read moreSourceยงfn prop_union(self, other: Self) -> Union<Self>where
Self: Sized,
fn prop_union(self, other: Self) -> Union<Self>where
Self: Sized,
Sourceยงfn prop_recursive<R, F>(
self,
depth: u32,
desired_size: u32,
expected_branch_size: u32,
recurse: F,
) -> Recursive<Self::Value, F>
fn prop_recursive<R, F>( self, depth: u32, desired_size: u32, expected_branch_size: u32, recurse: F, ) -> Recursive<Self::Value, F>
self
items as leaves. Read moreSourceยงfn prop_shuffle(self) -> Shuffle<Self>
fn prop_shuffle(self) -> Shuffle<Self>
Sourceยงfn boxed(self) -> BoxedStrategy<Self::Value>where
Self: Sized + 'static,
fn boxed(self) -> BoxedStrategy<Self::Value>where
Self: Sized + 'static,
Strategy
so it can be passed around as a
simple trait object. Read moreSourceยงimpl Strategy for Range<f64>
impl Strategy for Range<f64>
Sourceยงtype Tree = BinarySearch
type Tree = BinarySearch
Strategy
.Sourceยงtype Value = f64
type Value = f64
Sourceยงfn new_tree(
&self,
runner: &mut TestRunner,
) -> Result<<Range<f64> as Strategy>::Tree, Reason>
fn new_tree( &self, runner: &mut TestRunner, ) -> Result<<Range<f64> as Strategy>::Tree, Reason>
Sourceยงfn prop_map<O, F>(self, fun: F) -> Map<Self, F>
fn prop_map<O, F>(self, fun: F) -> Map<Self, F>
fun
. Read moreSourceยงfn prop_map_into<O>(self) -> MapInto<Self, O>
fn prop_map_into<O>(self) -> MapInto<Self, O>
Sourceยงfn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
fn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
fun
, which is additionally given a random number generator. Read moreSourceยงfn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
fn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
Sourceยงfn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
Sourceยงfn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
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 moreSourceยงfn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
fn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
fun
. Read moreSourceยงfn prop_filter_map<F, O>(
self,
whence: impl Into<Reason>,
fun: F,
) -> FilterMap<Self, F>
fn prop_filter_map<F, O>( self, whence: impl Into<Reason>, fun: F, ) -> FilterMap<Self, F>
fun
returns Some(value)
and rejects those where fun
returns None
. Read moreSourceยงfn prop_union(self, other: Self) -> Union<Self>where
Self: Sized,
fn prop_union(self, other: Self) -> Union<Self>where
Self: Sized,
Sourceยงfn prop_recursive<R, F>(
self,
depth: u32,
desired_size: u32,
expected_branch_size: u32,
recurse: F,
) -> Recursive<Self::Value, F>
fn prop_recursive<R, F>( self, depth: u32, desired_size: u32, expected_branch_size: u32, recurse: F, ) -> Recursive<Self::Value, F>
self
items as leaves. Read moreSourceยงfn prop_shuffle(self) -> Shuffle<Self>
fn prop_shuffle(self) -> Shuffle<Self>
Sourceยงfn boxed(self) -> BoxedStrategy<Self::Value>where
Self: Sized + 'static,
fn boxed(self) -> BoxedStrategy<Self::Value>where
Self: Sized + 'static,
Strategy
so it can be passed around as a
simple trait object. Read moreSourceยงimpl Strategy for Range<i128>
impl Strategy for Range<i128>
Sourceยงtype Tree = BinarySearch
type Tree = BinarySearch
Strategy
.Sourceยงtype Value = i128
type Value = i128
Sourceยงfn new_tree(
&self,
runner: &mut TestRunner,
) -> Result<<Range<i128> as Strategy>::Tree, Reason>
fn new_tree( &self, runner: &mut TestRunner, ) -> Result<<Range<i128> as Strategy>::Tree, Reason>
Sourceยงfn prop_map<O, F>(self, fun: F) -> Map<Self, F>
fn prop_map<O, F>(self, fun: F) -> Map<Self, F>
fun
. Read moreSourceยงfn prop_map_into<O>(self) -> MapInto<Self, O>
fn prop_map_into<O>(self) -> MapInto<Self, O>
Sourceยงfn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
fn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
fun
, which is additionally given a random number generator. Read moreSourceยงfn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
fn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
Sourceยงfn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
Sourceยงfn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
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 moreSourceยงfn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
fn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
fun
. Read moreSourceยงfn prop_filter_map<F, O>(
self,
whence: impl Into<Reason>,
fun: F,
) -> FilterMap<Self, F>
fn prop_filter_map<F, O>( self, whence: impl Into<Reason>, fun: F, ) -> FilterMap<Self, F>
fun
returns Some(value)
and rejects those where fun
returns None
. Read moreSourceยงfn prop_union(self, other: Self) -> Union<Self>where
Self: Sized,
fn prop_union(self, other: Self) -> Union<Self>where
Self: Sized,
Sourceยงfn prop_recursive<R, F>(
self,
depth: u32,
desired_size: u32,
expected_branch_size: u32,
recurse: F,
) -> Recursive<Self::Value, F>
fn prop_recursive<R, F>( self, depth: u32, desired_size: u32, expected_branch_size: u32, recurse: F, ) -> Recursive<Self::Value, F>
self
items as leaves. Read moreSourceยงfn prop_shuffle(self) -> Shuffle<Self>
fn prop_shuffle(self) -> Shuffle<Self>
Sourceยงfn boxed(self) -> BoxedStrategy<Self::Value>where
Self: Sized + 'static,
fn boxed(self) -> BoxedStrategy<Self::Value>where
Self: Sized + 'static,
Strategy
so it can be passed around as a
simple trait object. Read moreSourceยงimpl Strategy for Range<i16>
impl Strategy for Range<i16>
Sourceยงtype Tree = BinarySearch
type Tree = BinarySearch
Strategy
.Sourceยงtype Value = i16
type Value = i16
Sourceยงfn new_tree(
&self,
runner: &mut TestRunner,
) -> Result<<Range<i16> as Strategy>::Tree, Reason>
fn new_tree( &self, runner: &mut TestRunner, ) -> Result<<Range<i16> as Strategy>::Tree, Reason>
Sourceยงfn prop_map<O, F>(self, fun: F) -> Map<Self, F>
fn prop_map<O, F>(self, fun: F) -> Map<Self, F>
fun
. Read moreSourceยงfn prop_map_into<O>(self) -> MapInto<Self, O>
fn prop_map_into<O>(self) -> MapInto<Self, O>
Sourceยงfn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
fn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
fun
, which is additionally given a random number generator. Read moreSourceยงfn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
fn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
Sourceยงfn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
Sourceยงfn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
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 moreSourceยงfn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
fn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
fun
. Read moreSourceยงfn prop_filter_map<F, O>(
self,
whence: impl Into<Reason>,
fun: F,
) -> FilterMap<Self, F>
fn prop_filter_map<F, O>( self, whence: impl Into<Reason>, fun: F, ) -> FilterMap<Self, F>
fun
returns Some(value)
and rejects those where fun
returns None
. Read moreSourceยงfn prop_union(self, other: Self) -> Union<Self>where
Self: Sized,
fn prop_union(self, other: Self) -> Union<Self>where
Self: Sized,
Sourceยงfn prop_recursive<R, F>(
self,
depth: u32,
desired_size: u32,
expected_branch_size: u32,
recurse: F,
) -> Recursive<Self::Value, F>
fn prop_recursive<R, F>( self, depth: u32, desired_size: u32, expected_branch_size: u32, recurse: F, ) -> Recursive<Self::Value, F>
self
items as leaves. Read moreSourceยงfn prop_shuffle(self) -> Shuffle<Self>
fn prop_shuffle(self) -> Shuffle<Self>
Sourceยงfn boxed(self) -> BoxedStrategy<Self::Value>where
Self: Sized + 'static,
fn boxed(self) -> BoxedStrategy<Self::Value>where
Self: Sized + 'static,
Strategy
so it can be passed around as a
simple trait object. Read moreSourceยงimpl Strategy for Range<i32>
impl Strategy for Range<i32>
Sourceยงtype Tree = BinarySearch
type Tree = BinarySearch
Strategy
.Sourceยงtype Value = i32
type Value = i32
Sourceยงfn new_tree(
&self,
runner: &mut TestRunner,
) -> Result<<Range<i32> as Strategy>::Tree, Reason>
fn new_tree( &self, runner: &mut TestRunner, ) -> Result<<Range<i32> as Strategy>::Tree, Reason>
Sourceยงfn prop_map<O, F>(self, fun: F) -> Map<Self, F>
fn prop_map<O, F>(self, fun: F) -> Map<Self, F>
fun
. Read moreSourceยงfn prop_map_into<O>(self) -> MapInto<Self, O>
fn prop_map_into<O>(self) -> MapInto<Self, O>
Sourceยงfn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
fn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
fun
, which is additionally given a random number generator. Read moreSourceยงfn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
fn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
Sourceยงfn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
Sourceยงfn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
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 moreSourceยงfn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
fn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
fun
. Read moreSourceยงfn prop_filter_map<F, O>(
self,
whence: impl Into<Reason>,
fun: F,
) -> FilterMap<Self, F>
fn prop_filter_map<F, O>( self, whence: impl Into<Reason>, fun: F, ) -> FilterMap<Self, F>
fun
returns Some(value)
and rejects those where fun
returns None
. Read moreSourceยงfn prop_union(self, other: Self) -> Union<Self>where
Self: Sized,
fn prop_union(self, other: Self) -> Union<Self>where
Self: Sized,
Sourceยงfn prop_recursive<R, F>(
self,
depth: u32,
desired_size: u32,
expected_branch_size: u32,
recurse: F,
) -> Recursive<Self::Value, F>
fn prop_recursive<R, F>( self, depth: u32, desired_size: u32, expected_branch_size: u32, recurse: F, ) -> Recursive<Self::Value, F>
self
items as leaves. Read moreSourceยงfn prop_shuffle(self) -> Shuffle<Self>
fn prop_shuffle(self) -> Shuffle<Self>
Sourceยงfn boxed(self) -> BoxedStrategy<Self::Value>where
Self: Sized + 'static,
fn boxed(self) -> BoxedStrategy<Self::Value>where
Self: Sized + 'static,
Strategy
so it can be passed around as a
simple trait object. Read moreSourceยงimpl Strategy for Range<i64>
impl Strategy for Range<i64>
Sourceยงtype Tree = BinarySearch
type Tree = BinarySearch
Strategy
.Sourceยงtype Value = i64
type Value = i64
Sourceยงfn new_tree(
&self,
runner: &mut TestRunner,
) -> Result<<Range<i64> as Strategy>::Tree, Reason>
fn new_tree( &self, runner: &mut TestRunner, ) -> Result<<Range<i64> as Strategy>::Tree, Reason>
Sourceยงfn prop_map<O, F>(self, fun: F) -> Map<Self, F>
fn prop_map<O, F>(self, fun: F) -> Map<Self, F>
fun
. Read moreSourceยงfn prop_map_into<O>(self) -> MapInto<Self, O>
fn prop_map_into<O>(self) -> MapInto<Self, O>
Sourceยงfn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
fn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
fun
, which is additionally given a random number generator. Read moreSourceยงfn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
fn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
Sourceยงfn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
Sourceยงfn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
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 moreSourceยงfn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
fn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
fun
. Read moreSourceยงfn prop_filter_map<F, O>(
self,
whence: impl Into<Reason>,
fun: F,
) -> FilterMap<Self, F>
fn prop_filter_map<F, O>( self, whence: impl Into<Reason>, fun: F, ) -> FilterMap<Self, F>
fun
returns Some(value)
and rejects those where fun
returns None
. Read moreSourceยงfn prop_union(self, other: Self) -> Union<Self>where
Self: Sized,
fn prop_union(self, other: Self) -> Union<Self>where
Self: Sized,
Sourceยงfn prop_recursive<R, F>(
self,
depth: u32,
desired_size: u32,
expected_branch_size: u32,
recurse: F,
) -> Recursive<Self::Value, F>
fn prop_recursive<R, F>( self, depth: u32, desired_size: u32, expected_branch_size: u32, recurse: F, ) -> Recursive<Self::Value, F>
self
items as leaves. Read moreSourceยงfn prop_shuffle(self) -> Shuffle<Self>
fn prop_shuffle(self) -> Shuffle<Self>
Sourceยงfn boxed(self) -> BoxedStrategy<Self::Value>where
Self: Sized + 'static,
fn boxed(self) -> BoxedStrategy<Self::Value>where
Self: Sized + 'static,
Strategy
so it can be passed around as a
simple trait object. Read moreSourceยงimpl Strategy for Range<i8>
impl Strategy for Range<i8>
Sourceยงtype Tree = BinarySearch
type Tree = BinarySearch
Strategy
.Sourceยงtype Value = i8
type Value = i8
Sourceยงfn new_tree(
&self,
runner: &mut TestRunner,
) -> Result<<Range<i8> as Strategy>::Tree, Reason>
fn new_tree( &self, runner: &mut TestRunner, ) -> Result<<Range<i8> as Strategy>::Tree, Reason>
Sourceยงfn prop_map<O, F>(self, fun: F) -> Map<Self, F>
fn prop_map<O, F>(self, fun: F) -> Map<Self, F>
fun
. Read moreSourceยงfn prop_map_into<O>(self) -> MapInto<Self, O>
fn prop_map_into<O>(self) -> MapInto<Self, O>
Sourceยงfn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
fn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
fun
, which is additionally given a random number generator. Read moreSourceยงfn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
fn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
Sourceยงfn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
Sourceยงfn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
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 moreSourceยงfn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
fn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
fun
. Read moreSourceยงfn prop_filter_map<F, O>(
self,
whence: impl Into<Reason>,
fun: F,
) -> FilterMap<Self, F>
fn prop_filter_map<F, O>( self, whence: impl Into<Reason>, fun: F, ) -> FilterMap<Self, F>
fun
returns Some(value)
and rejects those where fun
returns None
. Read moreSourceยงfn prop_union(self, other: Self) -> Union<Self>where
Self: Sized,
fn prop_union(self, other: Self) -> Union<Self>where
Self: Sized,
Sourceยงfn prop_recursive<R, F>(
self,
depth: u32,
desired_size: u32,
expected_branch_size: u32,
recurse: F,
) -> Recursive<Self::Value, F>
fn prop_recursive<R, F>( self, depth: u32, desired_size: u32, expected_branch_size: u32, recurse: F, ) -> Recursive<Self::Value, F>
self
items as leaves. Read moreSourceยงfn prop_shuffle(self) -> Shuffle<Self>
fn prop_shuffle(self) -> Shuffle<Self>
Sourceยงfn boxed(self) -> BoxedStrategy<Self::Value>where
Self: Sized + 'static,
fn boxed(self) -> BoxedStrategy<Self::Value>where
Self: Sized + 'static,
Strategy
so it can be passed around as a
simple trait object. Read moreSourceยงimpl Strategy for Range<isize>
impl Strategy for Range<isize>
Sourceยงtype Tree = BinarySearch
type Tree = BinarySearch
Strategy
.Sourceยงtype Value = isize
type Value = isize
Sourceยงfn new_tree(
&self,
runner: &mut TestRunner,
) -> Result<<Range<isize> as Strategy>::Tree, Reason>
fn new_tree( &self, runner: &mut TestRunner, ) -> Result<<Range<isize> as Strategy>::Tree, Reason>
Sourceยงfn prop_map<O, F>(self, fun: F) -> Map<Self, F>
fn prop_map<O, F>(self, fun: F) -> Map<Self, F>
fun
. Read moreSourceยงfn prop_map_into<O>(self) -> MapInto<Self, O>
fn prop_map_into<O>(self) -> MapInto<Self, O>
Sourceยงfn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
fn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
fun
, which is additionally given a random number generator. Read moreSourceยงfn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
fn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
Sourceยงfn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
Sourceยงfn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
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 moreSourceยงfn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
fn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
fun
. Read moreSourceยงfn prop_filter_map<F, O>(
self,
whence: impl Into<Reason>,
fun: F,
) -> FilterMap<Self, F>
fn prop_filter_map<F, O>( self, whence: impl Into<Reason>, fun: F, ) -> FilterMap<Self, F>
fun
returns Some(value)
and rejects those where fun
returns None
. Read moreSourceยงfn prop_union(self, other: Self) -> Union<Self>where
Self: Sized,
fn prop_union(self, other: Self) -> Union<Self>where
Self: Sized,
Sourceยงfn prop_recursive<R, F>(
self,
depth: u32,
desired_size: u32,
expected_branch_size: u32,
recurse: F,
) -> Recursive<Self::Value, F>
fn prop_recursive<R, F>( self, depth: u32, desired_size: u32, expected_branch_size: u32, recurse: F, ) -> Recursive<Self::Value, F>
self
items as leaves. Read moreSourceยงfn prop_shuffle(self) -> Shuffle<Self>
fn prop_shuffle(self) -> Shuffle<Self>
Sourceยงfn boxed(self) -> BoxedStrategy<Self::Value>where
Self: Sized + 'static,
fn boxed(self) -> BoxedStrategy<Self::Value>where
Self: Sized + 'static,
Strategy
so it can be passed around as a
simple trait object. Read moreSourceยงimpl Strategy for Range<u128>
impl Strategy for Range<u128>
Sourceยงtype Tree = BinarySearch
type Tree = BinarySearch
Strategy
.Sourceยงtype Value = u128
type Value = u128
Sourceยงfn new_tree(
&self,
runner: &mut TestRunner,
) -> Result<<Range<u128> as Strategy>::Tree, Reason>
fn new_tree( &self, runner: &mut TestRunner, ) -> Result<<Range<u128> as Strategy>::Tree, Reason>
Sourceยงfn prop_map<O, F>(self, fun: F) -> Map<Self, F>
fn prop_map<O, F>(self, fun: F) -> Map<Self, F>
fun
. Read moreSourceยงfn prop_map_into<O>(self) -> MapInto<Self, O>
fn prop_map_into<O>(self) -> MapInto<Self, O>
Sourceยงfn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
fn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
fun
, which is additionally given a random number generator. Read moreSourceยงfn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
fn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
Sourceยงfn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
Sourceยงfn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
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 moreSourceยงfn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
fn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
fun
. Read moreSourceยงfn prop_filter_map<F, O>(
self,
whence: impl Into<Reason>,
fun: F,
) -> FilterMap<Self, F>
fn prop_filter_map<F, O>( self, whence: impl Into<Reason>, fun: F, ) -> FilterMap<Self, F>
fun
returns Some(value)
and rejects those where fun
returns None
. Read moreSourceยงfn prop_union(self, other: Self) -> Union<Self>where
Self: Sized,
fn prop_union(self, other: Self) -> Union<Self>where
Self: Sized,
Sourceยงfn prop_recursive<R, F>(
self,
depth: u32,
desired_size: u32,
expected_branch_size: u32,
recurse: F,
) -> Recursive<Self::Value, F>
fn prop_recursive<R, F>( self, depth: u32, desired_size: u32, expected_branch_size: u32, recurse: F, ) -> Recursive<Self::Value, F>
self
items as leaves. Read moreSourceยงfn prop_shuffle(self) -> Shuffle<Self>
fn prop_shuffle(self) -> Shuffle<Self>
Sourceยงfn boxed(self) -> BoxedStrategy<Self::Value>where
Self: Sized + 'static,
fn boxed(self) -> BoxedStrategy<Self::Value>where
Self: Sized + 'static,
Strategy
so it can be passed around as a
simple trait object. Read moreSourceยงimpl Strategy for Range<u16>
impl Strategy for Range<u16>
Sourceยงtype Tree = BinarySearch
type Tree = BinarySearch
Strategy
.Sourceยงtype Value = u16
type Value = u16
Sourceยงfn new_tree(
&self,
runner: &mut TestRunner,
) -> Result<<Range<u16> as Strategy>::Tree, Reason>
fn new_tree( &self, runner: &mut TestRunner, ) -> Result<<Range<u16> as Strategy>::Tree, Reason>
Sourceยงfn prop_map<O, F>(self, fun: F) -> Map<Self, F>
fn prop_map<O, F>(self, fun: F) -> Map<Self, F>
fun
. Read moreSourceยงfn prop_map_into<O>(self) -> MapInto<Self, O>
fn prop_map_into<O>(self) -> MapInto<Self, O>
Sourceยงfn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
fn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
fun
, which is additionally given a random number generator. Read moreSourceยงfn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
fn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
Sourceยงfn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
Sourceยงfn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
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 moreSourceยงfn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
fn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
fun
. Read moreSourceยงfn prop_filter_map<F, O>(
self,
whence: impl Into<Reason>,
fun: F,
) -> FilterMap<Self, F>
fn prop_filter_map<F, O>( self, whence: impl Into<Reason>, fun: F, ) -> FilterMap<Self, F>
fun
returns Some(value)
and rejects those where fun
returns None
. Read moreSourceยงfn prop_union(self, other: Self) -> Union<Self>where
Self: Sized,
fn prop_union(self, other: Self) -> Union<Self>where
Self: Sized,
Sourceยงfn prop_recursive<R, F>(
self,
depth: u32,
desired_size: u32,
expected_branch_size: u32,
recurse: F,
) -> Recursive<Self::Value, F>
fn prop_recursive<R, F>( self, depth: u32, desired_size: u32, expected_branch_size: u32, recurse: F, ) -> Recursive<Self::Value, F>
self
items as leaves. Read moreSourceยงfn prop_shuffle(self) -> Shuffle<Self>
fn prop_shuffle(self) -> Shuffle<Self>
Sourceยงfn boxed(self) -> BoxedStrategy<Self::Value>where
Self: Sized + 'static,
fn boxed(self) -> BoxedStrategy<Self::Value>where
Self: Sized + 'static,
Strategy
so it can be passed around as a
simple trait object. Read moreSourceยงimpl Strategy for Range<u32>
impl Strategy for Range<u32>
Sourceยงtype Tree = BinarySearch
type Tree = BinarySearch
Strategy
.Sourceยงtype Value = u32
type Value = u32
Sourceยงfn new_tree(
&self,
runner: &mut TestRunner,
) -> Result<<Range<u32> as Strategy>::Tree, Reason>
fn new_tree( &self, runner: &mut TestRunner, ) -> Result<<Range<u32> as Strategy>::Tree, Reason>
Sourceยงfn prop_map<O, F>(self, fun: F) -> Map<Self, F>
fn prop_map<O, F>(self, fun: F) -> Map<Self, F>
fun
. Read moreSourceยงfn prop_map_into<O>(self) -> MapInto<Self, O>
fn prop_map_into<O>(self) -> MapInto<Self, O>
Sourceยงfn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
fn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
fun
, which is additionally given a random number generator. Read moreSourceยงfn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
fn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
Sourceยงfn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
Sourceยงfn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
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 moreSourceยงfn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
fn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
fun
. Read moreSourceยงfn prop_filter_map<F, O>(
self,
whence: impl Into<Reason>,
fun: F,
) -> FilterMap<Self, F>
fn prop_filter_map<F, O>( self, whence: impl Into<Reason>, fun: F, ) -> FilterMap<Self, F>
fun
returns Some(value)
and rejects those where fun
returns None
. Read moreSourceยงfn prop_union(self, other: Self) -> Union<Self>where
Self: Sized,
fn prop_union(self, other: Self) -> Union<Self>where
Self: Sized,
Sourceยงfn prop_recursive<R, F>(
self,
depth: u32,
desired_size: u32,
expected_branch_size: u32,
recurse: F,
) -> Recursive<Self::Value, F>
fn prop_recursive<R, F>( self, depth: u32, desired_size: u32, expected_branch_size: u32, recurse: F, ) -> Recursive<Self::Value, F>
self
items as leaves. Read moreSourceยงfn prop_shuffle(self) -> Shuffle<Self>
fn prop_shuffle(self) -> Shuffle<Self>
Sourceยงfn boxed(self) -> BoxedStrategy<Self::Value>where
Self: Sized + 'static,
fn boxed(self) -> BoxedStrategy<Self::Value>where
Self: Sized + 'static,
Strategy
so it can be passed around as a
simple trait object. Read moreSourceยงimpl Strategy for Range<u64>
impl Strategy for Range<u64>
Sourceยงtype Tree = BinarySearch
type Tree = BinarySearch
Strategy
.Sourceยงtype Value = u64
type Value = u64
Sourceยงfn new_tree(
&self,
runner: &mut TestRunner,
) -> Result<<Range<u64> as Strategy>::Tree, Reason>
fn new_tree( &self, runner: &mut TestRunner, ) -> Result<<Range<u64> as Strategy>::Tree, Reason>
Sourceยงfn prop_map<O, F>(self, fun: F) -> Map<Self, F>
fn prop_map<O, F>(self, fun: F) -> Map<Self, F>
fun
. Read moreSourceยงfn prop_map_into<O>(self) -> MapInto<Self, O>
fn prop_map_into<O>(self) -> MapInto<Self, O>
Sourceยงfn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
fn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
fun
, which is additionally given a random number generator. Read moreSourceยงfn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
fn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
Sourceยงfn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
Sourceยงfn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
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 moreSourceยงfn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
fn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
fun
. Read moreSourceยงfn prop_filter_map<F, O>(
self,
whence: impl Into<Reason>,
fun: F,
) -> FilterMap<Self, F>
fn prop_filter_map<F, O>( self, whence: impl Into<Reason>, fun: F, ) -> FilterMap<Self, F>
fun
returns Some(value)
and rejects those where fun
returns None
. Read moreSourceยงfn prop_union(self, other: Self) -> Union<Self>where
Self: Sized,
fn prop_union(self, other: Self) -> Union<Self>where
Self: Sized,
Sourceยงfn prop_recursive<R, F>(
self,
depth: u32,
desired_size: u32,
expected_branch_size: u32,
recurse: F,
) -> Recursive<Self::Value, F>
fn prop_recursive<R, F>( self, depth: u32, desired_size: u32, expected_branch_size: u32, recurse: F, ) -> Recursive<Self::Value, F>
self
items as leaves. Read moreSourceยงfn prop_shuffle(self) -> Shuffle<Self>
fn prop_shuffle(self) -> Shuffle<Self>
Sourceยงfn boxed(self) -> BoxedStrategy<Self::Value>where
Self: Sized + 'static,
fn boxed(self) -> BoxedStrategy<Self::Value>where
Self: Sized + 'static,
Strategy
so it can be passed around as a
simple trait object. Read moreSourceยงimpl Strategy for Range<u8>
impl Strategy for Range<u8>
Sourceยงtype Tree = BinarySearch
type Tree = BinarySearch
Strategy
.Sourceยงtype Value = u8
type Value = u8
Sourceยงfn new_tree(
&self,
runner: &mut TestRunner,
) -> Result<<Range<u8> as Strategy>::Tree, Reason>
fn new_tree( &self, runner: &mut TestRunner, ) -> Result<<Range<u8> as Strategy>::Tree, Reason>
Sourceยงfn prop_map<O, F>(self, fun: F) -> Map<Self, F>
fn prop_map<O, F>(self, fun: F) -> Map<Self, F>
fun
. Read moreSourceยงfn prop_map_into<O>(self) -> MapInto<Self, O>
fn prop_map_into<O>(self) -> MapInto<Self, O>
Sourceยงfn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
fn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
fun
, which is additionally given a random number generator. Read moreSourceยงfn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
fn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
Sourceยงfn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
Sourceยงfn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
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 moreSourceยงfn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
fn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
fun
. Read moreSourceยงfn prop_filter_map<F, O>(
self,
whence: impl Into<Reason>,
fun: F,
) -> FilterMap<Self, F>
fn prop_filter_map<F, O>( self, whence: impl Into<Reason>, fun: F, ) -> FilterMap<Self, F>
fun
returns Some(value)
and rejects those where fun
returns None
. Read moreSourceยงfn prop_union(self, other: Self) -> Union<Self>where
Self: Sized,
fn prop_union(self, other: Self) -> Union<Self>where
Self: Sized,
Sourceยงfn prop_recursive<R, F>(
self,
depth: u32,
desired_size: u32,
expected_branch_size: u32,
recurse: F,
) -> Recursive<Self::Value, F>
fn prop_recursive<R, F>( self, depth: u32, desired_size: u32, expected_branch_size: u32, recurse: F, ) -> Recursive<Self::Value, F>
self
items as leaves. Read moreSourceยงfn prop_shuffle(self) -> Shuffle<Self>
fn prop_shuffle(self) -> Shuffle<Self>
Sourceยงfn boxed(self) -> BoxedStrategy<Self::Value>where
Self: Sized + 'static,
fn boxed(self) -> BoxedStrategy<Self::Value>where
Self: Sized + 'static,
Strategy
so it can be passed around as a
simple trait object. Read moreSourceยงimpl Strategy for Range<usize>
impl Strategy for Range<usize>
Sourceยงtype Tree = BinarySearch
type Tree = BinarySearch
Strategy
.Sourceยงtype Value = usize
type Value = usize
Sourceยงfn new_tree(
&self,
runner: &mut TestRunner,
) -> Result<<Range<usize> as Strategy>::Tree, Reason>
fn new_tree( &self, runner: &mut TestRunner, ) -> Result<<Range<usize> as Strategy>::Tree, Reason>
Sourceยงfn prop_map<O, F>(self, fun: F) -> Map<Self, F>
fn prop_map<O, F>(self, fun: F) -> Map<Self, F>
fun
. Read moreSourceยงfn prop_map_into<O>(self) -> MapInto<Self, O>
fn prop_map_into<O>(self) -> MapInto<Self, O>
Sourceยงfn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
fn prop_perturb<O, F>(self, fun: F) -> Perturb<Self, F>
fun
, which is additionally given a random number generator. Read moreSourceยงfn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
fn prop_flat_map<S, F>(self, fun: F) -> Flatten<Map<Self, F>>
Sourceยงfn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
Sourceยงfn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
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 moreSourceยงfn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
fn prop_filter<R, F>(self, whence: R, fun: F) -> Filter<Self, F>
fun
. Read moreSourceยงfn prop_filter_map<F, O>(
self,
whence: impl Into<Reason>,
fun: F,
) -> FilterMap<Self, F>
fn prop_filter_map<F, O>( self, whence: impl Into<Reason>, fun: F, ) -> FilterMap<Self, F>
fun
returns Some(value)
and rejects those where fun
returns None
. Read moreSourceยงfn prop_union(self, other: Self) -> Union<Self>where
Self: Sized,
fn prop_union(self, other: Self) -> Union<Self>where
Self: Sized,
Sourceยงfn prop_recursive<R, F>(
self,
depth: u32,
desired_size: u32,
expected_branch_size: u32,
recurse: F,
) -> Recursive<Self::Value, F>
fn prop_recursive<R, F>( self, depth: u32, desired_size: u32, expected_branch_size: u32, recurse: F, ) -> Recursive<Self::Value, F>
self
items as leaves. Read moreSourceยงfn prop_shuffle(self) -> Shuffle<Self>
fn prop_shuffle(self) -> Shuffle<Self>
Sourceยงfn boxed(self) -> BoxedStrategy<Self::Value>where
Self: Sized + 'static,
fn boxed(self) -> BoxedStrategy<Self::Value>where
Self: Sized + 'static,
Strategy
so it can be passed around as a
simple trait object. Read moreimpl<Idx> Eq for Range<Idx>where
Idx: Eq,
impl<A> FusedIterator for Range<A>where
A: Step,
impl<Idx> StructuralPartialEq for Range<Idx>
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Sourceยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Sourceยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Sourceยงimpl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Sourceยงfn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Sourceยงimpl<T> Instrument for T
impl<T> Instrument for T
Sourceยงfn instrument(self, span: Span) -> Instrumented<Self> โ
fn instrument(self, span: Span) -> Instrumented<Self> โ
Sourceยงfn in_current_span(self) -> Instrumented<Self> โ
fn in_current_span(self) -> Instrumented<Self> โ
Sourceยงimpl<T> IntoEither for T
impl<T> IntoEither for T
Sourceยงfn into_either(self, into_left: bool) -> Either<Self, Self> โ
fn into_either(self, into_left: bool) -> Either<Self, Self> โ
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 moreSourceยงfn into_either_with<F>(self, into_left: F) -> Either<Self, Self> โ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> โ
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 moreSourceยงimpl<I> IntoIterator for Iwhere
I: Iterator,
impl<I> IntoIterator for Iwhere
I: Iterator,
Sourceยงimpl<I> IntoResettable<ValueParser> for Iwhere
I: Into<ValueParser>,
impl<I> IntoResettable<ValueParser> for Iwhere
I: Into<ValueParser>,
Sourceยงfn into_resettable(self) -> Resettable<ValueParser>
fn into_resettable(self) -> Resettable<ValueParser>
Sourceยงimpl<I> IntoResettable<ValueRange> for Iwhere
I: Into<ValueRange>,
impl<I> IntoResettable<ValueRange> for Iwhere
I: Into<ValueRange>,
Sourceยงfn into_resettable(self) -> Resettable<ValueRange>
fn into_resettable(self) -> Resettable<ValueRange>
Sourceยงimpl<I> IteratorRandom for Iwhere
I: Iterator,
impl<I> IteratorRandom for Iwhere
I: Iterator,
Sourceยงfn choose<R>(self, rng: &mut R) -> Option<Self::Item>
fn choose<R>(self, rng: &mut R) -> Option<Self::Item>
Sourceยงfn choose_stable<R>(self, rng: &mut R) -> Option<Self::Item>
fn choose_stable<R>(self, rng: &mut R) -> Option<Self::Item>
Sourceยงimpl<I> IteratorRandom for Iwhere
I: Iterator,
impl<I> IteratorRandom for Iwhere
I: Iterator,
Sourceยงfn choose_stable<R>(self, rng: &mut R) -> Option<Self::Item>
fn choose_stable<R>(self, rng: &mut R) -> Option<Self::Item>
Sourceยงimpl<T> Itertools for T
impl<T> Itertools for T
Sourceยงfn interleave<J>(
self,
other: J,
) -> Interleave<Self, <J as IntoIterator>::IntoIter> โ
fn interleave<J>( self, other: J, ) -> Interleave<Self, <J as IntoIterator>::IntoIter> โ
Sourceยงfn interleave_shortest<J>(
self,
other: J,
) -> InterleaveShortest<Self, <J as IntoIterator>::IntoIter> โ
fn interleave_shortest<J>( self, other: J, ) -> InterleaveShortest<Self, <J as IntoIterator>::IntoIter> โ
Sourceยงfn intersperse(
self,
element: Self::Item,
) -> IntersperseWith<Self, IntersperseElementSimple<Self::Item>> โ
fn intersperse( self, element: Self::Item, ) -> IntersperseWith<Self, IntersperseElementSimple<Self::Item>> โ
Sourceยงfn intersperse_with<F>(self, element: F) -> IntersperseWith<Self, F> โ
fn intersperse_with<F>(self, element: F) -> IntersperseWith<Self, F> โ
Sourceยงfn get<R>(self, index: R) -> <R as IteratorIndex<Self>>::Outputwhere
Self: Sized,
R: IteratorIndex<Self>,
fn get<R>(self, index: R) -> <R as IteratorIndex<Self>>::Outputwhere
Self: Sized,
R: IteratorIndex<Self>,
Sourceยงfn zip_longest<J>(
self,
other: J,
) -> ZipLongest<Self, <J as IntoIterator>::IntoIter> โwhere
J: IntoIterator,
Self: Sized,
fn zip_longest<J>(
self,
other: J,
) -> ZipLongest<Self, <J as IntoIterator>::IntoIter> โwhere
J: IntoIterator,
Self: Sized,
Sourceยงfn zip_eq<J>(self, other: J) -> ZipEq<Self, <J as IntoIterator>::IntoIter> โwhere
J: IntoIterator,
Self: Sized,
fn zip_eq<J>(self, other: J) -> ZipEq<Self, <J as IntoIterator>::IntoIter> โwhere
J: IntoIterator,
Self: Sized,
Sourceยงfn batching<B, F>(self, f: F) -> Batching<Self, F> โ
fn batching<B, F>(self, f: F) -> Batching<Self, F> โ
Sourceยงfn chunk_by<K, F>(self, key: F) -> ChunkBy<K, Self, F>
fn chunk_by<K, F>(self, key: F) -> ChunkBy<K, Self, F>
Sourceยงfn group_by<K, F>(self, key: F) -> ChunkBy<K, Self, F>
fn group_by<K, F>(self, key: F) -> ChunkBy<K, Self, F>
.chunk_by()
.Sourceยงfn chunks(self, size: usize) -> IntoChunks<Self>where
Self: Sized,
fn chunks(self, size: usize) -> IntoChunks<Self>where
Self: Sized,
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,
fn tuple_windows<T>(self) -> TupleWindows<Self, T> โwhere
Self: Sized + Iterator<Item = <T as TupleCollect>::Item>,
T: HomogeneousTuple,
<T as TupleCollect>::Item: Clone,
Sourceยงfn circular_tuple_windows<T>(self) -> CircularTupleWindows<Self, T> โ
fn circular_tuple_windows<T>(self) -> CircularTupleWindows<Self, T> โ
Sourceยงfn tuples<T>(self) -> Tuples<Self, T> โ
fn tuples<T>(self) -> Tuples<Self, T> โ
Sourceยงfn tee(self) -> (Tee<Self>, Tee<Self>)
fn tee(self) -> (Tee<Self>, Tee<Self>)
Sourceยงfn map_ok<F, T, U, E>(self, f: F) -> MapSpecialCase<Self, MapSpecialCaseFnOk<F>>
fn map_ok<F, T, U, E>(self, f: F) -> MapSpecialCase<Self, MapSpecialCaseFnOk<F>>
Result::Ok
value. Result::Err
values are
unchanged. Read moreSourceยงfn filter_ok<F, T, E>(self, f: F) -> FilterOk<Self, F> โ
fn filter_ok<F, T, E>(self, f: F) -> FilterOk<Self, F> โ
Result::Ok
value with the provided closure. Result::Err
values are
unchanged. Read moreSourceยงfn filter_map_ok<F, T, U, E>(self, f: F) -> FilterMapOk<Self, F> โ
fn filter_map_ok<F, T, U, E>(self, f: F) -> FilterMapOk<Self, F> โ
Result::Ok
value with the provided closure. Result::Err
values are unchanged. Read moreSourceยงfn flatten_ok<T, E>(self) -> FlattenOk<Self, T, E> โ
fn flatten_ok<T, E>(self) -> FlattenOk<Self, T, E> โ
Result::Ok
value into
a series of Result::Ok
values. Result::Err
values are unchanged. Read moreSourceยงfn process_results<F, T, E, R>(self, processor: F) -> Result<R, E>
fn process_results<F, T, E, R>(self, processor: F) -> Result<R, E>
Result
values instead. Read moreSourceยงfn merge<J>(
self,
other: J,
) -> MergeBy<Self, <J as IntoIterator>::IntoIter, MergeLte> โ
fn merge<J>( self, other: J, ) -> MergeBy<Self, <J as IntoIterator>::IntoIter, MergeLte> โ
Sourceยงfn merge_by<J, F>(
self,
other: J,
is_first: F,
) -> MergeBy<Self, <J as IntoIterator>::IntoIter, F> โ
fn merge_by<J, F>( self, other: J, is_first: F, ) -> MergeBy<Self, <J as IntoIterator>::IntoIter, F> โ
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>> โ
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>> โ
Sourceยงfn kmerge(self) -> KMergeBy<<Self::Item as IntoIterator>::IntoIter, KMergeByLt> โ
fn kmerge(self) -> KMergeBy<<Self::Item as IntoIterator>::IntoIter, KMergeByLt> โ
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,
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,
Sourceยงfn cartesian_product<J>(
self,
other: J,
) -> Product<Self, <J as IntoIterator>::IntoIter> โ
fn cartesian_product<J>( self, other: J, ) -> Product<Self, <J as IntoIterator>::IntoIter> โ
self
and J
. Read moreSourceยง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,
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,
self
. Read moreSourceยงfn coalesce<F>(self, f: F) -> CoalesceBy<Self, F, NoCount>
fn coalesce<F>(self, f: F) -> CoalesceBy<Self, F, NoCount>
Sourceยงfn dedup(self) -> CoalesceBy<Self, DedupPred2CoalescePred<DedupEq>, NoCount>
fn dedup(self) -> CoalesceBy<Self, DedupPred2CoalescePred<DedupEq>, NoCount>
Sourceยงfn dedup_by<Cmp>(
self,
cmp: Cmp,
) -> CoalesceBy<Self, DedupPred2CoalescePred<Cmp>, NoCount>
fn dedup_by<Cmp>( self, cmp: Cmp, ) -> CoalesceBy<Self, DedupPred2CoalescePred<Cmp>, NoCount>
Sourceยงfn dedup_with_count(
self,
) -> CoalesceBy<Self, DedupPredWithCount2CoalescePred<DedupEq>, WithCount>where
Self: Sized,
fn dedup_with_count(
self,
) -> CoalesceBy<Self, DedupPredWithCount2CoalescePred<DedupEq>, WithCount>where
Self: Sized,
Sourceยงfn dedup_by_with_count<Cmp>(
self,
cmp: Cmp,
) -> CoalesceBy<Self, DedupPredWithCount2CoalescePred<Cmp>, WithCount>
fn dedup_by_with_count<Cmp>( self, cmp: Cmp, ) -> CoalesceBy<Self, DedupPredWithCount2CoalescePred<Cmp>, WithCount>
Sourceยงfn duplicates(self) -> DuplicatesBy<Self, Self::Item, ById>
fn duplicates(self) -> DuplicatesBy<Self, Self::Item, ById>
Sourceยงfn duplicates_by<V, F>(self, f: F) -> DuplicatesBy<Self, V, ByFn<F>>
fn duplicates_by<V, F>(self, f: F) -> DuplicatesBy<Self, V, ByFn<F>>
Sourceยงfn unique(self) -> Unique<Self> โ
fn unique(self) -> Unique<Self> โ
Sourceยงfn unique_by<V, F>(self, f: F) -> UniqueBy<Self, V, F> โ
fn unique_by<V, F>(self, f: F) -> UniqueBy<Self, V, F> โ
Sourceยงfn peeking_take_while<F>(&mut self, accept: F) -> PeekingTakeWhile<'_, Self, F> โ
fn peeking_take_while<F>(&mut self, accept: F) -> PeekingTakeWhile<'_, Self, F> โ
accept
returns true
. Read moreSourceยงfn take_while_ref<F>(&mut self, accept: F) -> TakeWhileRef<'_, Self, F> โ
fn take_while_ref<F>(&mut self, accept: F) -> TakeWhileRef<'_, Self, F> โ
Clone
-able iterator
to only pick off elements while the predicate accept
returns true
. Read moreSourceยงfn take_while_inclusive<F>(self, accept: F) -> TakeWhileInclusive<Self, F> โ
fn take_while_inclusive<F>(self, accept: F) -> TakeWhileInclusive<Self, F> โ
true
, including the element for which the predicate
first returned false
. Read moreSourceยงfn while_some<A>(self) -> WhileSome<Self> โ
fn while_some<A>(self) -> WhileSome<Self> โ
Option<A>
iterator elements
and produces A
. Stops on the first None
encountered. Read moreSourceยงfn tuple_combinations<T>(self) -> TupleCombinations<Self, T> โ
fn tuple_combinations<T>(self) -> TupleCombinations<Self, T> โ
Sourceยงfn array_combinations<const K: usize>(
self,
) -> CombinationsGeneric<Self, [usize; K]>
fn array_combinations<const K: usize>( self, ) -> CombinationsGeneric<Self, [usize; K]>
Sourceยงfn combinations(self, k: usize) -> CombinationsGeneric<Self, Vec<usize>>
fn combinations(self, k: usize) -> CombinationsGeneric<Self, Vec<usize>>
k
-length combinations of
the elements from an iterator. Read moreSourceยงfn combinations_with_replacement(
self,
k: usize,
) -> CombinationsWithReplacement<Self> โ
fn combinations_with_replacement( self, k: usize, ) -> CombinationsWithReplacement<Self> โ
k
-length combinations of
the elements from an iterator, with replacement. Read moreSourceยงfn permutations(self, k: usize) -> Permutations<Self> โ
fn permutations(self, k: usize) -> Permutations<Self> โ
Sourceยงfn powerset(self) -> Powerset<Self> โ
fn powerset(self) -> Powerset<Self> โ
Sourceยงfn pad_using<F>(self, min: usize, f: F) -> PadUsing<Self, F> โ
fn pad_using<F>(self, min: usize, f: F) -> PadUsing<Self, F> โ
min
by filling missing elements using a closure f
. Read moreSourceยงfn with_position(self) -> WithPosition<Self> โwhere
Self: Sized,
fn with_position(self) -> WithPosition<Self> โwhere
Self: Sized,
Position
to
ease special-case handling of the first or last elements. Read moreSourceยงfn positions<P>(self, predicate: P) -> Positions<Self, P> โ
fn positions<P>(self, predicate: P) -> Positions<Self, P> โ
Sourceยงfn update<F>(self, updater: F) -> Update<Self, F> โ
fn update<F>(self, updater: F) -> Update<Self, F> โ
Sourceยงfn next_array<const N: usize>(&mut self) -> Option<[Self::Item; N]>where
Self: Sized,
fn next_array<const N: usize>(&mut self) -> Option<[Self::Item; N]>where
Self: Sized,
Sourceยงfn collect_array<const N: usize>(self) -> Option<[Self::Item; N]>where
Self: Sized,
fn collect_array<const N: usize>(self) -> Option<[Self::Item; N]>where
Self: Sized,
Sourceยงfn next_tuple<T>(&mut self) -> Option<T>
fn next_tuple<T>(&mut self) -> Option<T>
Sourceยงfn collect_tuple<T>(self) -> Option<T>
fn collect_tuple<T>(self) -> Option<T>
Sourceยงfn find_position<P>(&mut self, pred: P) -> Option<(usize, Self::Item)>
fn find_position<P>(&mut self, pred: P) -> Option<(usize, Self::Item)>
Sourceยงfn find_or_last<P>(self, predicate: P) -> Option<Self::Item>
fn find_or_last<P>(self, predicate: P) -> Option<Self::Item>
Sourceยงfn find_or_first<P>(self, predicate: P) -> Option<Self::Item>
fn find_or_first<P>(self, predicate: P) -> Option<Self::Item>
Sourceยงfn contains<Q>(&mut self, query: &Q) -> bool
fn contains<Q>(&mut self, query: &Q) -> bool
true
if the given item is present in this iterator. Read moreSourceยงfn all_equal_value(
&mut self,
) -> Result<Self::Item, Option<(Self::Item, Self::Item)>>
fn all_equal_value( &mut self, ) -> Result<Self::Item, Option<(Self::Item, Self::Item)>>
Sourceยงfn all_unique(&mut self) -> bool
fn all_unique(&mut self) -> bool
Sourceยงfn dropping(self, n: usize) -> Selfwhere
Self: Sized,
fn dropping(self, n: usize) -> Selfwhere
Self: Sized,
n
elements from the iterator eagerly,
and return the same iterator again. Read moreSourceยงfn dropping_back(self, n: usize) -> Selfwhere
Self: Sized + DoubleEndedIterator,
fn dropping_back(self, n: usize) -> Selfwhere
Self: Sized + DoubleEndedIterator,
n
elements from the iterator eagerly,
and return the same iterator again. Read moreSourceยงfn collect_vec(self) -> Vec<Self::Item>where
Self: Sized,
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>
fn try_collect<T, U, E>(self) -> Result<U, E>
Sourceยงfn set_from<'a, A, J>(&mut self, from: J) -> usize
fn set_from<'a, A, J>(&mut self, from: J) -> usize
self
from the from
iterator,
stopping at the shortest of the two iterators. Read moreSourceยงfn format(self, sep: &str) -> Format<'_, Self>where
Self: Sized,
fn format(self, sep: &str) -> Format<'_, Self>where
Self: Sized,
sep
. Read moreSourceยงfn format_with<F>(self, sep: &str, format: F) -> FormatWith<'_, Self, F>
fn format_with<F>(self, sep: &str, format: F) -> FormatWith<'_, Self, F>
sep
. Read moreSourceยงfn fold_ok<A, E, B, F>(&mut self, start: B, f: F) -> Result<B, E>
fn fold_ok<A, E, B, F>(&mut self, start: B, f: F) -> Result<B, E>
Result
values from an iterator. Read moreSourceยงfn fold_options<A, B, F>(&mut self, start: B, f: F) -> Option<B>
fn fold_options<A, B, F>(&mut self, start: B, f: F) -> Option<B>
Option
values from an iterator. Read moreSourceยงfn fold1<F>(self, f: F) -> Option<Self::Item>
fn fold1<F>(self, f: F) -> Option<Self::Item>
Iterator::reduce
insteadSourceยงfn tree_reduce<F>(self, f: F) -> Option<Self::Item>
fn tree_reduce<F>(self, f: F) -> Option<Self::Item>
Sourceยงfn tree_fold1<F>(self, f: F) -> Option<Self::Item>
fn tree_fold1<F>(self, f: F) -> Option<Self::Item>
.tree_reduce()
.Sourceยงfn fold_while<B, F>(&mut self, init: B, f: F) -> FoldWhile<B>
fn fold_while<B, F>(&mut self, init: B, f: F) -> FoldWhile<B>
Sourceยงfn sum1<S>(self) -> Option<S>
fn sum1<S>(self) -> Option<S>
Sourceยงfn product1<P>(self) -> Option<P>
fn product1<P>(self) -> Option<P>
Sourceยงfn sorted_unstable(self) -> IntoIter<Self::Item> โ
fn sorted_unstable(self) -> IntoIter<Self::Item> โ
Sourceยงfn sorted_unstable_by<F>(self, cmp: F) -> IntoIter<Self::Item> โ
fn sorted_unstable_by<F>(self, cmp: F) -> IntoIter<Self::Item> โ
Sourceยงfn sorted_unstable_by_key<K, F>(self, f: F) -> IntoIter<Self::Item> โ
fn sorted_unstable_by_key<K, F>(self, f: F) -> IntoIter<Self::Item> โ
Sourceยงfn sorted(self) -> IntoIter<Self::Item> โ
fn sorted(self) -> IntoIter<Self::Item> โ
Sourceยงfn sorted_by<F>(self, cmp: F) -> IntoIter<Self::Item> โ
fn sorted_by<F>(self, cmp: F) -> IntoIter<Self::Item> โ
Sourceยงfn sorted_by_key<K, F>(self, f: F) -> IntoIter<Self::Item> โ
fn sorted_by_key<K, F>(self, f: F) -> IntoIter<Self::Item> โ
Sourceยงfn sorted_by_cached_key<K, F>(self, f: F) -> IntoIter<Self::Item> โ
fn sorted_by_cached_key<K, F>(self, f: F) -> IntoIter<Self::Item> โ
Sourceยงfn k_smallest(self, k: usize) -> IntoIter<Self::Item> โ
fn k_smallest(self, k: usize) -> IntoIter<Self::Item> โ
Sourceยงfn k_smallest_by<F>(self, k: usize, cmp: F) -> IntoIter<Self::Item> โ
fn k_smallest_by<F>(self, k: usize, cmp: F) -> IntoIter<Self::Item> โ
Sourceยงfn k_smallest_by_key<F, K>(self, k: usize, key: F) -> IntoIter<Self::Item> โ
fn k_smallest_by_key<F, K>(self, k: usize, key: F) -> IntoIter<Self::Item> โ
Sourceยงfn k_smallest_relaxed(self, k: usize) -> IntoIter<Self::Item> โ
fn k_smallest_relaxed(self, k: usize) -> IntoIter<Self::Item> โ
Sourceยงfn k_smallest_relaxed_by<F>(self, k: usize, cmp: F) -> IntoIter<Self::Item> โ
fn k_smallest_relaxed_by<F>(self, k: usize, cmp: F) -> IntoIter<Self::Item> โ
Sourceยงfn k_smallest_relaxed_by_key<F, K>(
self,
k: usize,
key: F,
) -> IntoIter<Self::Item> โ
fn k_smallest_relaxed_by_key<F, K>( self, k: usize, key: F, ) -> IntoIter<Self::Item> โ
Sourceยงfn k_largest(self, k: usize) -> IntoIter<Self::Item> โ
fn k_largest(self, k: usize) -> IntoIter<Self::Item> โ
Sourceยงfn k_largest_by<F>(self, k: usize, cmp: F) -> IntoIter<Self::Item> โ
fn k_largest_by<F>(self, k: usize, cmp: F) -> IntoIter<Self::Item> โ
Sourceยงfn k_largest_by_key<F, K>(self, k: usize, key: F) -> IntoIter<Self::Item> โ
fn k_largest_by_key<F, K>(self, k: usize, key: F) -> IntoIter<Self::Item> โ
Sourceยงfn k_largest_relaxed(self, k: usize) -> IntoIter<Self::Item> โ
fn k_largest_relaxed(self, k: usize) -> IntoIter<Self::Item> โ
Sourceยงfn k_largest_relaxed_by<F>(self, k: usize, cmp: F) -> IntoIter<Self::Item> โ
fn k_largest_relaxed_by<F>(self, k: usize, cmp: F) -> IntoIter<Self::Item> โ
Sourceยงfn k_largest_relaxed_by_key<F, K>(
self,
k: usize,
key: F,
) -> IntoIter<Self::Item> โ
fn k_largest_relaxed_by_key<F, K>( self, k: usize, key: F, ) -> IntoIter<Self::Item> โ
Sourceยงfn tail(self, n: usize) -> IntoIter<Self::Item> โwhere
Self: Sized,
fn tail(self, n: usize) -> IntoIter<Self::Item> โwhere
Self: Sized,
n
elements. Read moreSourceยงfn partition_map<A, B, F, L, R>(self, predicate: F) -> (A, B)
fn partition_map<A, B, F, L, R>(self, predicate: F) -> (A, B)
Iterator::partition
, each partition may
have a distinct type. Read moreSourceยงfn partition_result<A, B, T, E>(self) -> (A, B)
fn partition_result<A, B, T, E>(self) -> (A, B)
Result
s into one list of all the Ok
elements
and another list of all the Err
elements. Read moreSourceยงfn into_group_map<K, V>(self) -> HashMap<K, Vec<V>>
fn into_group_map<K, V>(self) -> HashMap<K, Vec<V>>
HashMap
of keys mapped to Vec
s of values. Keys and values
are taken from (Key, Value)
tuple pairs yielded by the input iterator. Read moreSourceยงfn into_group_map_by<K, V, F>(self, f: F) -> HashMap<K, Vec<V>>
fn into_group_map_by<K, V, F>(self, f: F) -> HashMap<K, Vec<V>>
HashMap
of keys mapped to Vec
s of values. The key is specified
in the closure. The values are taken from the input iterator. Read moreSourceยงfn into_grouping_map<K, V>(self) -> GroupingMap<Self>
fn into_grouping_map<K, V>(self) -> GroupingMap<Self>
GroupingMap
to be used later with one of the efficient
group-and-fold operations it allows to perform. Read moreSourceยงfn into_grouping_map_by<K, V, F>(
self,
key_mapper: F,
) -> GroupingMap<MapSpecialCase<Self, GroupingMapFn<F>>>
fn into_grouping_map_by<K, V, F>( self, key_mapper: F, ) -> GroupingMap<MapSpecialCase<Self, GroupingMapFn<F>>>
GroupingMap
to be used later with one of the efficient
group-and-fold operations it allows to perform. Read moreSourceยงfn min_set_by<F>(self, compare: F) -> Vec<Self::Item>
fn min_set_by<F>(self, compare: F) -> Vec<Self::Item>
Sourceยงfn min_set_by_key<K, F>(self, key: F) -> Vec<Self::Item>
fn min_set_by_key<K, F>(self, key: F) -> Vec<Self::Item>
Sourceยงfn max_set_by<F>(self, compare: F) -> Vec<Self::Item>
fn max_set_by<F>(self, compare: F) -> Vec<Self::Item>
Sourceยงfn max_set_by_key<K, F>(self, key: F) -> Vec<Self::Item>
fn max_set_by_key<K, F>(self, key: F) -> Vec<Self::Item>
Sourceยงfn minmax(self) -> MinMaxResult<Self::Item>
fn minmax(self) -> MinMaxResult<Self::Item>
Sourceยงfn minmax_by_key<K, F>(self, key: F) -> MinMaxResult<Self::Item>
fn minmax_by_key<K, F>(self, key: F) -> MinMaxResult<Self::Item>
Sourceยงfn minmax_by<F>(self, compare: F) -> MinMaxResult<Self::Item>
fn minmax_by<F>(self, compare: F) -> MinMaxResult<Self::Item>
Sourceยงfn position_max(self) -> Option<usize>
fn position_max(self) -> Option<usize>
Sourceยงfn position_max_by_key<K, F>(self, key: F) -> Option<usize>
fn position_max_by_key<K, F>(self, key: F) -> Option<usize>
Sourceยงfn position_max_by<F>(self, compare: F) -> Option<usize>
fn position_max_by<F>(self, compare: F) -> Option<usize>
Sourceยงfn position_min(self) -> Option<usize>
fn position_min(self) -> Option<usize>
Sourceยงfn position_min_by_key<K, F>(self, key: F) -> Option<usize>
fn position_min_by_key<K, F>(self, key: F) -> Option<usize>
Sourceยงfn position_min_by<F>(self, compare: F) -> Option<usize>
fn position_min_by<F>(self, compare: F) -> Option<usize>
Sourceยงfn position_minmax(self) -> MinMaxResult<usize>
fn position_minmax(self) -> MinMaxResult<usize>
Sourceยงfn position_minmax_by_key<K, F>(self, key: F) -> MinMaxResult<usize>
fn position_minmax_by_key<K, F>(self, key: F) -> MinMaxResult<usize>
Sourceยงfn position_minmax_by<F>(self, compare: F) -> MinMaxResult<usize>
fn position_minmax_by<F>(self, compare: F) -> MinMaxResult<usize>
Sourceยงfn exactly_one(self) -> Result<Self::Item, ExactlyOneError<Self>>where
Self: Sized,
fn exactly_one(self) -> Result<Self::Item, ExactlyOneError<Self>>where
Self: Sized,
Sourceยงfn at_most_one(self) -> Result<Option<Self::Item>, ExactlyOneError<Self>>where
Self: Sized,
fn at_most_one(self) -> Result<Option<Self::Item>, ExactlyOneError<Self>>where
Self: Sized,
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 moreSourceยงfn multipeek(self) -> MultiPeek<Self> โwhere
Self: Sized,
fn multipeek(self) -> MultiPeek<Self> โwhere
Self: Sized,
.next()
values without advancing the base iterator. Read moreSourceยงfn counts(self) -> HashMap<Self::Item, usize>
fn counts(self) -> HashMap<Self::Item, usize>
HashMap
which
contains each item that appears in the iterator and the number
of times it appears. Read moreSourceยงfn counts_by<K, F>(self, f: F) -> HashMap<K, usize>
fn counts_by<K, F>(self, f: F) -> HashMap<K, usize>
HashMap
which
contains each item that appears in the iterator and the number
of times it appears,
determining identity using a keying function. Read moreSourceยงfn multiunzip<FromI>(self) -> FromIwhere
Self: Sized + MultiUnzip<FromI>,
fn multiunzip<FromI>(self) -> FromIwhere
Self: Sized + MultiUnzip<FromI>,
Sourceยงimpl<T> Itertools for T
impl<T> Itertools for T
Sourceยงfn interleave<J>(
self,
other: J,
) -> Interleave<Self, <J as IntoIterator>::IntoIter> โ
fn interleave<J>( self, other: J, ) -> Interleave<Self, <J as IntoIterator>::IntoIter> โ
Sourceยงfn interleave_shortest<J>(
self,
other: J,
) -> InterleaveShortest<Self, <J as IntoIterator>::IntoIter> โ
fn interleave_shortest<J>( self, other: J, ) -> InterleaveShortest<Self, <J as IntoIterator>::IntoIter> โ
Sourceยงfn intersperse(
self,
element: Self::Item,
) -> IntersperseWith<Self, IntersperseElementSimple<Self::Item>> โ
fn intersperse( self, element: Self::Item, ) -> IntersperseWith<Self, IntersperseElementSimple<Self::Item>> โ
Sourceยงfn intersperse_with<F>(self, element: F) -> IntersperseWith<Self, F> โ
fn intersperse_with<F>(self, element: F) -> IntersperseWith<Self, F> โ
Sourceยงfn get<R>(self, index: R) -> <R as IteratorIndex<Self>>::Outputwhere
Self: Sized,
R: IteratorIndex<Self>,
fn get<R>(self, index: R) -> <R as IteratorIndex<Self>>::Outputwhere
Self: Sized,
R: IteratorIndex<Self>,
Sourceยงfn zip_longest<J>(
self,
other: J,
) -> ZipLongest<Self, <J as IntoIterator>::IntoIter> โwhere
J: IntoIterator,
Self: Sized,
fn zip_longest<J>(
self,
other: J,
) -> ZipLongest<Self, <J as IntoIterator>::IntoIter> โwhere
J: IntoIterator,
Self: Sized,
Sourceยงfn zip_eq<J>(self, other: J) -> ZipEq<Self, <J as IntoIterator>::IntoIter> โwhere
J: IntoIterator,
Self: Sized,
fn zip_eq<J>(self, other: J) -> ZipEq<Self, <J as IntoIterator>::IntoIter> โwhere
J: IntoIterator,
Self: Sized,
Sourceยงfn batching<B, F>(self, f: F) -> Batching<Self, F> โ
fn batching<B, F>(self, f: F) -> Batching<Self, F> โ
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,
fn tuple_windows<T>(self) -> TupleWindows<Self, T> โwhere
Self: Sized + Iterator<Item = <T as TupleCollect>::Item>,
T: HomogeneousTuple,
<T as TupleCollect>::Item: Clone,
Sourceยงfn circular_tuple_windows<T>(self) -> CircularTupleWindows<Self, T> โ
fn circular_tuple_windows<T>(self) -> CircularTupleWindows<Self, T> โ
Sourceยงfn tuples<T>(self) -> Tuples<Self, T> โ
fn tuples<T>(self) -> Tuples<Self, T> โ
Sourceยงfn map_ok<F, T, U, E>(self, f: F) -> MapSpecialCase<Self, MapSpecialCaseFnOk<F>>
fn map_ok<F, T, U, E>(self, f: F) -> MapSpecialCase<Self, MapSpecialCaseFnOk<F>>
Result::Ok
value. Result::Err
values are
unchanged. Read moreSourceยงfn filter_ok<F, T, E>(self, f: F) -> FilterOk<Self, F> โ
fn filter_ok<F, T, E>(self, f: F) -> FilterOk<Self, F> โ
Result::Ok
value with the provided closure. Result::Err
values are
unchanged. Read moreSourceยงfn filter_map_ok<F, T, U, E>(self, f: F) -> FilterMapOk<Self, F> โ
fn filter_map_ok<F, T, U, E>(self, f: F) -> FilterMapOk<Self, F> โ
Result::Ok
value with the provided closure. Result::Err
values are unchanged. Read moreSourceยงfn flatten_ok<T, E>(self) -> FlattenOk<Self, T, E> โ
fn flatten_ok<T, E>(self) -> FlattenOk<Self, T, E> โ
Result::Ok
value into
a series of Result::Ok
values. Result::Err
values are unchanged. Read moreSourceยงfn process_results<F, T, E, R>(self, processor: F) -> Result<R, E>
fn process_results<F, T, E, R>(self, processor: F) -> Result<R, E>
Result
values instead. Read moreSourceยงfn merge<J>(
self,
other: J,
) -> MergeBy<Self, <J as IntoIterator>::IntoIter, MergeLte> โ
fn merge<J>( self, other: J, ) -> MergeBy<Self, <J as IntoIterator>::IntoIter, MergeLte> โ
Sourceยงfn merge_by<J, F>(
self,
other: J,
is_first: F,
) -> MergeBy<Self, <J as IntoIterator>::IntoIter, F> โ
fn merge_by<J, F>( self, other: J, is_first: F, ) -> MergeBy<Self, <J as IntoIterator>::IntoIter, F> โ
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>> โ
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>> โ
Sourceยงfn cartesian_product<J>(
self,
other: J,
) -> Product<Self, <J as IntoIterator>::IntoIter> โ
fn cartesian_product<J>( self, other: J, ) -> Product<Self, <J as IntoIterator>::IntoIter> โ
self
and J
. Read moreSourceยงfn coalesce<F>(self, f: F) -> CoalesceBy<Self, F, NoCount>
fn coalesce<F>(self, f: F) -> CoalesceBy<Self, F, NoCount>
Sourceยงfn dedup(self) -> CoalesceBy<Self, DedupPred2CoalescePred<DedupEq>, NoCount>
fn dedup(self) -> CoalesceBy<Self, DedupPred2CoalescePred<DedupEq>, NoCount>
Sourceยงfn dedup_by<Cmp>(
self,
cmp: Cmp,
) -> CoalesceBy<Self, DedupPred2CoalescePred<Cmp>, NoCount>
fn dedup_by<Cmp>( self, cmp: Cmp, ) -> CoalesceBy<Self, DedupPred2CoalescePred<Cmp>, NoCount>
Sourceยงfn dedup_with_count(
self,
) -> CoalesceBy<Self, DedupPredWithCount2CoalescePred<DedupEq>, WithCount>where
Self: Sized,
fn dedup_with_count(
self,
) -> CoalesceBy<Self, DedupPredWithCount2CoalescePred<DedupEq>, WithCount>where
Self: Sized,
Sourceยงfn dedup_by_with_count<Cmp>(
self,
cmp: Cmp,
) -> CoalesceBy<Self, DedupPredWithCount2CoalescePred<Cmp>, WithCount>
fn dedup_by_with_count<Cmp>( self, cmp: Cmp, ) -> CoalesceBy<Self, DedupPredWithCount2CoalescePred<Cmp>, WithCount>
Sourceยงfn peeking_take_while<F>(&mut self, accept: F) -> PeekingTakeWhile<'_, Self, F> โ
fn peeking_take_while<F>(&mut self, accept: F) -> PeekingTakeWhile<'_, Self, F> โ
accept
returns true
. Read moreSourceยงfn take_while_ref<F>(&mut self, accept: F) -> TakeWhileRef<'_, Self, F> โ
fn take_while_ref<F>(&mut self, accept: F) -> TakeWhileRef<'_, Self, F> โ
Clone
-able iterator
to only pick off elements while the predicate accept
returns true
. Read moreSourceยงfn take_while_inclusive<F>(self, accept: F) -> TakeWhileInclusive<Self, F> โ
fn take_while_inclusive<F>(self, accept: F) -> TakeWhileInclusive<Self, F> โ
true
, including the element for which the predicate
first returned false
. Read moreSourceยงfn while_some<A>(self) -> WhileSome<Self> โ
fn while_some<A>(self) -> WhileSome<Self> โ
Option<A>
iterator elements
and produces A
. Stops on the first None
encountered. Read moreSourceยงfn tuple_combinations<T>(self) -> TupleCombinations<Self, T> โ
fn tuple_combinations<T>(self) -> TupleCombinations<Self, T> โ
Sourceยงfn pad_using<F>(self, min: usize, f: F) -> PadUsing<Self, F> โ
fn pad_using<F>(self, min: usize, f: F) -> PadUsing<Self, F> โ
min
by filling missing elements using a closure f
. Read moreSourceยงfn with_position(self) -> WithPosition<Self> โwhere
Self: Sized,
fn with_position(self) -> WithPosition<Self> โwhere
Self: Sized,
Position
to
ease special-case handling of the first or last elements. Read moreSourceยงfn positions<P>(self, predicate: P) -> Positions<Self, P> โ
fn positions<P>(self, predicate: P) -> Positions<Self, P> โ
Sourceยงfn update<F>(self, updater: F) -> Update<Self, F> โ
fn update<F>(self, updater: F) -> Update<Self, F> โ
Sourceยงfn next_tuple<T>(&mut self) -> Option<T>
fn next_tuple<T>(&mut self) -> Option<T>
Sourceยงfn collect_tuple<T>(self) -> Option<T>
fn collect_tuple<T>(self) -> Option<T>
Sourceยงfn find_position<P>(&mut self, pred: P) -> Option<(usize, Self::Item)>
fn find_position<P>(&mut self, pred: P) -> Option<(usize, Self::Item)>
Sourceยงfn find_or_last<P>(self, predicate: P) -> Option<Self::Item>
fn find_or_last<P>(self, predicate: P) -> Option<Self::Item>
Sourceยงfn find_or_first<P>(self, predicate: P) -> Option<Self::Item>
fn find_or_first<P>(self, predicate: P) -> Option<Self::Item>
Sourceยงfn contains<Q>(&mut self, query: &Q) -> bool
fn contains<Q>(&mut self, query: &Q) -> bool
true
if the given item is present in this iterator. Read moreSourceยงfn all_equal_value(
&mut self,
) -> Result<Self::Item, Option<(Self::Item, Self::Item)>>
fn all_equal_value( &mut self, ) -> Result<Self::Item, Option<(Self::Item, Self::Item)>>
Sourceยงfn dropping(self, n: usize) -> Selfwhere
Self: Sized,
fn dropping(self, n: usize) -> Selfwhere
Self: Sized,
n
elements from the iterator eagerly,
and return the same iterator again. Read moreSourceยงfn dropping_back(self, n: usize) -> Selfwhere
Self: Sized + DoubleEndedIterator,
fn dropping_back(self, n: usize) -> Selfwhere
Self: Sized + DoubleEndedIterator,
n
elements from the iterator eagerly,
and return the same iterator again. Read moreSourceยงfn try_collect<T, U, E>(self) -> Result<U, E>
fn try_collect<T, U, E>(self) -> Result<U, E>
Sourceยงfn set_from<'a, A, J>(&mut self, from: J) -> usize
fn set_from<'a, A, J>(&mut self, from: J) -> usize
self
from the from
iterator,
stopping at the shortest of the two iterators. Read moreSourceยงfn format(self, sep: &str) -> Format<'_, Self>where
Self: Sized,
fn format(self, sep: &str) -> Format<'_, Self>where
Self: Sized,
sep
. Read moreSourceยงfn format_with<F>(self, sep: &str, format: F) -> FormatWith<'_, Self, F>
fn format_with<F>(self, sep: &str, format: F) -> FormatWith<'_, Self, F>
sep
. Read moreSourceยงfn fold_ok<A, E, B, F>(&mut self, start: B, f: F) -> Result<B, E>
fn fold_ok<A, E, B, F>(&mut self, start: B, f: F) -> Result<B, E>
Result
values from an iterator. Read moreSourceยงfn fold_options<A, B, F>(&mut self, start: B, f: F) -> Option<B>
fn fold_options<A, B, F>(&mut self, start: B, f: F) -> Option<B>
Option
values from an iterator. Read moreSourceยงfn fold1<F>(self, f: F) -> Option<Self::Item>
fn fold1<F>(self, f: F) -> Option<Self::Item>
Iterator::reduce
insteadSourceยงfn tree_reduce<F>(self, f: F) -> Option<Self::Item>
fn tree_reduce<F>(self, f: F) -> Option<Self::Item>
Sourceยงfn tree_fold1<F>(self, f: F) -> Option<Self::Item>
fn tree_fold1<F>(self, f: F) -> Option<Self::Item>
.tree_reduce()
.Sourceยงfn fold_while<B, F>(&mut self, init: B, f: F) -> FoldWhile<B>
fn fold_while<B, F>(&mut self, init: B, f: F) -> FoldWhile<B>
Sourceยงfn sum1<S>(self) -> Option<S>
fn sum1<S>(self) -> Option<S>
Sourceยงfn product1<P>(self) -> Option<P>
fn product1<P>(self) -> Option<P>
Sourceยงfn partition_map<A, B, F, L, R>(self, predicate: F) -> (A, B)
fn partition_map<A, B, F, L, R>(self, predicate: F) -> (A, B)
Iterator::partition
, each partition may
have a distinct type. Read moreSourceยงfn partition_result<A, B, T, E>(self) -> (A, B)
fn partition_result<A, B, T, E>(self) -> (A, B)
Result
s into one list of all the Ok
elements
and another list of all the Err
elements. Read moreSourceยงfn minmax(self) -> MinMaxResult<Self::Item>
fn minmax(self) -> MinMaxResult<Self::Item>
Sourceยงfn minmax_by_key<K, F>(self, key: F) -> MinMaxResult<Self::Item>
fn minmax_by_key<K, F>(self, key: F) -> MinMaxResult<Self::Item>
Sourceยงfn minmax_by<F>(self, compare: F) -> MinMaxResult<Self::Item>
fn minmax_by<F>(self, compare: F) -> MinMaxResult<Self::Item>
Sourceยงfn position_max(self) -> Option<usize>
fn position_max(self) -> Option<usize>
Sourceยงfn position_max_by_key<K, F>(self, key: F) -> Option<usize>
fn position_max_by_key<K, F>(self, key: F) -> Option<usize>
Sourceยงfn position_max_by<F>(self, compare: F) -> Option<usize>
fn position_max_by<F>(self, compare: F) -> Option<usize>
Sourceยงfn position_min(self) -> Option<usize>
fn position_min(self) -> Option<usize>
Sourceยงfn position_min_by_key<K, F>(self, key: F) -> Option<usize>
fn position_min_by_key<K, F>(self, key: F) -> Option<usize>
Sourceยงfn position_min_by<F>(self, compare: F) -> Option<usize>
fn position_min_by<F>(self, compare: F) -> Option<usize>
Sourceยงfn position_minmax(self) -> MinMaxResult<usize>
fn position_minmax(self) -> MinMaxResult<usize>
Sourceยงfn position_minmax_by_key<K, F>(self, key: F) -> MinMaxResult<usize>
fn position_minmax_by_key<K, F>(self, key: F) -> MinMaxResult<usize>
Sourceยงfn position_minmax_by<F>(self, compare: F) -> MinMaxResult<usize>
fn position_minmax_by<F>(self, compare: F) -> MinMaxResult<usize>
Sourceยงfn exactly_one(self) -> Result<Self::Item, ExactlyOneError<Self>>where
Self: Sized,
fn exactly_one(self) -> Result<Self::Item, ExactlyOneError<Self>>where
Self: Sized,
Sourceยงfn at_most_one(self) -> Result<Option<Self::Item>, ExactlyOneError<Self>>where
Self: Sized,
fn at_most_one(self) -> Result<Option<Self::Item>, ExactlyOneError<Self>>where
Self: Sized,
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