pub struct ArbStrategy<A: ArbInterop> { /* private fields */ }
Implementations§
Source§impl<A: ArbInterop> ArbStrategy<A>
impl<A: ArbInterop> ArbStrategy<A>
Trait Implementations§
Source§impl<A: Clone + ArbInterop> Clone for ArbStrategy<A>
impl<A: Clone + ArbInterop> Clone for ArbStrategy<A>
Source§fn clone(&self) -> ArbStrategy<A>
fn clone(&self) -> ArbStrategy<A>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<A: Debug + ArbInterop> Debug for ArbStrategy<A>
impl<A: Debug + ArbInterop> Debug for ArbStrategy<A>
Source§impl<A: Hash + ArbInterop> Hash for ArbStrategy<A>
impl<A: Hash + ArbInterop> Hash for ArbStrategy<A>
Source§impl<A: Ord + ArbInterop> Ord for ArbStrategy<A>
impl<A: Ord + ArbInterop> Ord for ArbStrategy<A>
Source§fn cmp(&self, other: &ArbStrategy<A>) -> Ordering
fn cmp(&self, other: &ArbStrategy<A>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<A: PartialEq + ArbInterop> PartialEq for ArbStrategy<A>
impl<A: PartialEq + ArbInterop> PartialEq for ArbStrategy<A>
Source§impl<A: PartialOrd + ArbInterop> PartialOrd for ArbStrategy<A>
impl<A: PartialOrd + ArbInterop> PartialOrd for ArbStrategy<A>
Source§impl<A: ArbInterop> Strategy for ArbStrategy<A>
impl<A: ArbInterop> Strategy for ArbStrategy<A>
Source§type Tree = ArbValueTree<A>
type Tree = ArbValueTree<A>
The value tree generated by this
Strategy
.Source§type Value = A
type Value = A
The type of value used by functions under test generated by this Strategy. Read more
Source§fn new_tree(&self, runner: &mut TestRunner) -> NewTree<Self>
fn new_tree(&self, runner: &mut TestRunner) -> NewTree<Self>
Generate a new value tree from the given runner. Read more
Source§fn prop_map<O, F>(self, fun: F) -> Map<Self, F>
fn prop_map<O, F>(self, fun: F) -> Map<Self, F>
Returns a strategy which produces values transformed by the function
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>
Returns a strategy which produces values transformed by the function
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>>
Maps values produced by this strategy into new strategies and picks
values from those strategies. Read more
Source§fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
fn prop_ind_flat_map<S, F>(self, fun: F) -> IndFlatten<Map<Self, F>>
Maps values produced by this strategy into new strategies and picks
values from those strategies while considering the new strategies to be
independent. Read more
Source§fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
fn prop_ind_flat_map2<S, F>(self, fun: F) -> IndFlattenMap<Self, F>
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 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>
Returns a strategy which only produces values accepted by
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>
Returns a strategy which only produces transformed values where
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>
Generate a recursive structure with
self
items as leaves. Read moreSource§fn prop_shuffle(self) -> Shuffle<Self>
fn prop_shuffle(self) -> Shuffle<Self>
Shuffle the contents of the values produced by this strategy. Read more
Source§fn boxed(self) -> BoxedStrategy<Self::Value>where
Self: Sized + 'static,
fn boxed(self) -> BoxedStrategy<Self::Value>where
Self: Sized + 'static,
Erases the type of this
Strategy
so it can be passed around as a
simple trait object. Read moreimpl<A: Copy + ArbInterop> Copy for ArbStrategy<A>
impl<A: Eq + ArbInterop> Eq for ArbStrategy<A>
impl<A: ArbInterop> StructuralPartialEq for ArbStrategy<A>
Auto Trait Implementations§
impl<A> Freeze for ArbStrategy<A>
impl<A> RefUnwindSafe for ArbStrategy<A>where
A: RefUnwindSafe,
impl<A> Send for ArbStrategy<A>where
A: Send,
impl<A> Sync for ArbStrategy<A>where
A: Sync,
impl<A> Unpin for ArbStrategy<A>where
A: Unpin,
impl<A> UnwindSafe for ArbStrategy<A>where
A: 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
Mutably borrows from an owned value. Read more