Struct proptest::strategy::PerturbValueTree
source · [−]pub struct PerturbValueTree<S, F> { /* private fields */ }
Expand description
ValueTree
perturbation adaptor.
See Strategy::prop_perturb()
.
Trait Implementations
sourceimpl<S: Clone, F> Clone for PerturbValueTree<S, F>
impl<S: Clone, F> Clone for PerturbValueTree<S, F>
sourceimpl<S: Debug, F> Debug for PerturbValueTree<S, F>
impl<S: Debug, F> Debug for PerturbValueTree<S, F>
sourceimpl<S: ValueTree, O: Debug, F: Fn(S::Value, TestRng) -> O> ValueTree for PerturbValueTree<S, F>
impl<S: ValueTree, O: Debug, F: Fn(S::Value, TestRng) -> O> ValueTree for PerturbValueTree<S, F>
type Value = O
type Value = O
The type of the value produced by this ValueTree
.
sourcefn simplify(&mut self) -> bool
fn simplify(&mut self) -> bool
Attempts to simplify the current value. Notionally, this sets the “high” value to the current value, and the current value to a “halfway point” between high and low, rounding towards low. Read more
sourcefn complicate(&mut self) -> bool
fn complicate(&mut self) -> bool
Attempts to partially undo the last simplification. Notionally, this sets the “low” value to one plus the current value, and the current value to a “halfway point” between high and the new low, rounding towards low. Read more
Auto Trait Implementations
impl<S, F> RefUnwindSafe for PerturbValueTree<S, F> where
F: RefUnwindSafe,
S: RefUnwindSafe,
impl<S, F> Send for PerturbValueTree<S, F> where
F: Send + Sync,
S: Send,
impl<S, F> Sync for PerturbValueTree<S, F> where
F: Send + Sync,
S: Sync,
impl<S, F> Unpin for PerturbValueTree<S, F> where
S: Unpin,
impl<S, F> UnwindSafe for PerturbValueTree<S, F> where
F: RefUnwindSafe,
S: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more