1.0.0[][src]Struct un_algebra::tests::float::RangeTo

pub struct RangeTo<Idx> {
    pub end: Idx,
}

A range only bounded exclusively above (..end).

The RangeTo ..end contains all values with x < end. It cannot serve as an Iterator because it doesn't have a starting point.

Examples

The ..end syntax is a RangeTo:

assert_eq!((..5), std::ops::RangeTo { end: 5 });

It does not have an IntoIterator implementation, so you can't use it in a for loop directly. This won't compile:

This example deliberately fails to compile
// error[E0277]: the trait bound `std::ops::RangeTo<{integer}>:
// std::iter::Iterator` is not satisfied
for i in ..5 {
    // ...
}

When used as a slicing index, RangeTo produces a slice of all array elements before the index indicated by end.

let arr = [0, 1, 2, 3, 4];
assert_eq!(arr[ ..  ], [0,1,2,3,4]);
assert_eq!(arr[ .. 3], [0,1,2    ]);  // RangeTo
assert_eq!(arr[ ..=3], [0,1,2,3  ]);
assert_eq!(arr[1..  ], [  1,2,3,4]);
assert_eq!(arr[1.. 3], [  1,2    ]);
assert_eq!(arr[1..=3], [  1,2,3  ]);

Fields

end: Idx

The upper bound of the range (exclusive).

Methods

impl<Idx> RangeTo<Idx> where
    Idx: PartialOrd<Idx>, 
[src]

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

Returns true if item is contained in the range.

Examples

use std::f32;

assert!( (..5).contains(&-1_000_000_000));
assert!( (..5).contains(&4));
assert!(!(..5).contains(&5));

assert!( (..1.0).contains(&0.5));
assert!(!(..1.0).contains(&f32::NAN));
assert!(!(..f32::NAN).contains(&0.5));

Trait Implementations

impl<'_, T> RangeBounds<T> for RangeTo<&'_ T>1.28.0[src]

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

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

impl<T> RangeBounds<T> for RangeTo<T>1.28.0[src]

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

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

impl<Idx> Hash for RangeTo<Idx> where
    Idx: Hash
[src]

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

Feeds a slice of this type into the given [Hasher]. Read more

impl<Idx> Eq for RangeTo<Idx> where
    Idx: Eq
[src]

impl<Idx> Clone for RangeTo<Idx> where
    Idx: Clone
[src]

fn clone_from(&mut self, source: &Self)[src]

Performs copy-assignment from source. Read more

impl<Idx> Debug for RangeTo<Idx> where
    Idx: Debug
[src]

impl SliceIndex<str> for RangeTo<usize>1.20.0[src]

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

Returns a slice of the given string from the byte range [0, end). Equivalent to &self[0 .. end] or &mut self[0 .. 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 end does not point to the starting byte offset of a character (as defined by is_char_boundary), or if end > len.

type Output = str

The output type returned by methods.

impl<T> SliceIndex<[T]> for RangeTo<usize>1.15.0[src]

type Output = [T]

The output type returned by methods.

impl<Idx> Copy for RangeTo<Idx> where
    Idx: Copy
[src]

impl<Idx> PartialEq<RangeTo<Idx>> for RangeTo<Idx> where
    Idx: PartialEq<Idx>, 
[src]

impl IndexMut<RangeTo<usize>> for String1.3.0[src]

impl Index<RangeTo<usize>> for String[src]

type Output = str

The returned type after indexing.

impl Strategy for RangeTo<u128>[src]

type Tree = BinarySearch

The value tree generated by this Strategy.

type Value = u128

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

fn prop_union(self, other: Self) -> Union<Self>[src]

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

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

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

fn prop_shuffle(self) -> Shuffle<Self> where
    Self::Value: Shuffleable
[src]

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

fn boxed(self) -> BoxedStrategy<Self::Value> where
    Self: 'static, 
[src]

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

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

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

fn no_shrink(self) -> NoShrink<Self>[src]

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

impl Strategy for RangeTo<f64>[src]

type Tree = BinarySearch

The value tree generated by this Strategy.

type Value = f64

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

fn prop_union(self, other: Self) -> Union<Self>[src]

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

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

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

fn prop_shuffle(self) -> Shuffle<Self> where
    Self::Value: Shuffleable
[src]

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

fn boxed(self) -> BoxedStrategy<Self::Value> where
    Self: 'static, 
[src]

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

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

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

fn no_shrink(self) -> NoShrink<Self>[src]

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

impl Strategy for RangeTo<i32>[src]

type Tree = BinarySearch

The value tree generated by this Strategy.

type Value = i32

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

fn prop_union(self, other: Self) -> Union<Self>[src]

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

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

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

fn prop_shuffle(self) -> Shuffle<Self> where
    Self::Value: Shuffleable
[src]

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

fn boxed(self) -> BoxedStrategy<Self::Value> where
    Self: 'static, 
[src]

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

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

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

fn no_shrink(self) -> NoShrink<Self>[src]

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

impl Strategy for RangeTo<isize>[src]

type Tree = BinarySearch

The value tree generated by this Strategy.

type Value = isize

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

fn prop_union(self, other: Self) -> Union<Self>[src]

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

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

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

fn prop_shuffle(self) -> Shuffle<Self> where
    Self::Value: Shuffleable
[src]

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

fn boxed(self) -> BoxedStrategy<Self::Value> where
    Self: 'static, 
[src]

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

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

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

fn no_shrink(self) -> NoShrink<Self>[src]

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

impl Strategy for RangeTo<u32>[src]

type Tree = BinarySearch

The value tree generated by this Strategy.

type Value = u32

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

fn prop_union(self, other: Self) -> Union<Self>[src]

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

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

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

fn prop_shuffle(self) -> Shuffle<Self> where
    Self::Value: Shuffleable
[src]

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

fn boxed(self) -> BoxedStrategy<Self::Value> where
    Self: 'static, 
[src]

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

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

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

fn no_shrink(self) -> NoShrink<Self>[src]

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

impl Strategy for RangeTo<i128>[src]

type Tree = BinarySearch

The value tree generated by this Strategy.

type Value = i128

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

fn prop_union(self, other: Self) -> Union<Self>[src]

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

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

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

fn prop_shuffle(self) -> Shuffle<Self> where
    Self::Value: Shuffleable
[src]

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

fn boxed(self) -> BoxedStrategy<Self::Value> where
    Self: 'static, 
[src]

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

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

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

fn no_shrink(self) -> NoShrink<Self>[src]

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

impl Strategy for RangeTo<u64>[src]

type Tree = BinarySearch

The value tree generated by this Strategy.

type Value = u64

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

fn prop_union(self, other: Self) -> Union<Self>[src]

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

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

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

fn prop_shuffle(self) -> Shuffle<Self> where
    Self::Value: Shuffleable
[src]

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

fn boxed(self) -> BoxedStrategy<Self::Value> where
    Self: 'static, 
[src]

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

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

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

fn no_shrink(self) -> NoShrink<Self>[src]

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

impl Strategy for RangeTo<usize>[src]

type Tree = BinarySearch

The value tree generated by this Strategy.

type Value = usize

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

fn prop_union(self, other: Self) -> Union<Self>[src]

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

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

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

fn prop_shuffle(self) -> Shuffle<Self> where
    Self::Value: Shuffleable
[src]

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

fn boxed(self) -> BoxedStrategy<Self::Value> where
    Self: 'static, 
[src]

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

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

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

fn no_shrink(self) -> NoShrink<Self>[src]

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

impl Strategy for RangeTo<i16>[src]

type Tree = BinarySearch

The value tree generated by this Strategy.

type Value = i16

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

fn prop_union(self, other: Self) -> Union<Self>[src]

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

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

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

fn prop_shuffle(self) -> Shuffle<Self> where
    Self::Value: Shuffleable
[src]

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

fn boxed(self) -> BoxedStrategy<Self::Value> where
    Self: 'static, 
[src]

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

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

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

fn no_shrink(self) -> NoShrink<Self>[src]

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

impl Strategy for RangeTo<i64>[src]

type Tree = BinarySearch

The value tree generated by this Strategy.

type Value = i64

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

fn prop_union(self, other: Self) -> Union<Self>[src]

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

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

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

fn prop_shuffle(self) -> Shuffle<Self> where
    Self::Value: Shuffleable
[src]

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

fn boxed(self) -> BoxedStrategy<Self::Value> where
    Self: 'static, 
[src]

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

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

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

fn no_shrink(self) -> NoShrink<Self>[src]

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

impl Strategy for RangeTo<u16>[src]

type Tree = BinarySearch

The value tree generated by this Strategy.

type Value = u16

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

fn prop_union(self, other: Self) -> Union<Self>[src]

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

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

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

fn prop_shuffle(self) -> Shuffle<Self> where
    Self::Value: Shuffleable
[src]

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

fn boxed(self) -> BoxedStrategy<Self::Value> where
    Self: 'static, 
[src]

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

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

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

fn no_shrink(self) -> NoShrink<Self>[src]

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

impl Strategy for RangeTo<f32>[src]

type Tree = BinarySearch

The value tree generated by this Strategy.

type Value = f32

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

fn prop_union(self, other: Self) -> Union<Self>[src]

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

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

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

fn prop_shuffle(self) -> Shuffle<Self> where
    Self::Value: Shuffleable
[src]

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

fn boxed(self) -> BoxedStrategy<Self::Value> where
    Self: 'static, 
[src]

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

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

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

fn no_shrink(self) -> NoShrink<Self>[src]

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

impl Strategy for RangeTo<u8>[src]

type Tree = BinarySearch

The value tree generated by this Strategy.

type Value = u8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

fn prop_union(self, other: Self) -> Union<Self>[src]

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

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

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

fn prop_shuffle(self) -> Shuffle<Self> where
    Self::Value: Shuffleable
[src]

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

fn boxed(self) -> BoxedStrategy<Self::Value> where
    Self: 'static, 
[src]

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

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

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

fn no_shrink(self) -> NoShrink<Self>[src]

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

impl Strategy for RangeTo<i8>[src]

type Tree = BinarySearch

The value tree generated by this Strategy.

type Value = i8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

fn prop_union(self, other: Self) -> Union<Self>[src]

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

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

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

fn prop_shuffle(self) -> Shuffle<Self> where
    Self::Value: Shuffleable
[src]

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

fn boxed(self) -> BoxedStrategy<Self::Value> where
    Self: 'static, 
[src]

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

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

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

fn no_shrink(self) -> NoShrink<Self>[src]

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

impl From<RangeTo<usize>> for SizeRange[src]

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

impl<A> Arbitrary for RangeTo<A> where
    A: Arbitrary
[src]

type Parameters = <A as Arbitrary>::Parameters

The type of parameters that [arbitrary_with] accepts for configuration of the generated [Strategy]. Parameters must implement [Default]. Read more

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

The type of [Strategy] used to generate values of type Self. Read more

fn arbitrary() -> Self::Strategy[src]

Generates a [Strategy] for producing arbitrary values of type the implementing type (Self). Read more

impl<A> ArbitraryF1<A> for RangeTo<A> where
    A: 'static + Debug
[src]

type Parameters = ()

The type of parameters that [lift1_with] accepts for configuration of the lifted and generated [Strategy]. Parameters must implement [Default]. Read more

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

Lifts a given [Strategy] to a new [Strategy] for the (presumably) bigger type. This is useful for lifting a Strategy for SomeType to a container such as Vec<SomeType>. Read more

Auto Trait Implementations

impl<Idx> Send for RangeTo<Idx> where
    Idx: Send

impl<Idx> Sync for RangeTo<Idx> where
    Idx: Sync

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]