Struct proptest::option::Probability
source · [−]pub struct Probability(_);
Expand description
A probability in the range [0.0, 1.0]
with a default of 0.5
.
Implementations
sourceimpl Probability
impl Probability
Trait Implementations
sourceimpl Arbitrary for Probability
impl Arbitrary for Probability
type Parameters = ()
type Parameters = ()
The type of parameters that arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
. Read more
type Strategy = MapInto<RangeInclusive<f64>, Probability>
type Strategy = MapInto<RangeInclusive<f64>, Probability>
sourcefn arbitrary_with(_args: Self::Parameters) -> Self::Strategy
fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy
sourceimpl Clone for Probability
impl Clone for Probability
sourcefn clone(&self) -> Probability
fn clone(&self) -> Probability
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for Probability
impl Debug for Probability
sourceimpl Default for Probability
impl Default for Probability
sourceimpl From<Probability> for f64
impl From<Probability> for f64
sourcefn from(p: Probability) -> Self
fn from(p: Probability) -> Self
Converts to this type from the input type.
sourceimpl From<f64> for Probability
impl From<f64> for Probability
sourceimpl PartialEq<Probability> for Probability
impl PartialEq<Probability> for Probability
sourcefn eq(&self, other: &Probability) -> bool
fn eq(&self, other: &Probability) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &Probability) -> bool
fn ne(&self, other: &Probability) -> bool
This method tests for !=
.
impl Copy for Probability
impl StructuralPartialEq for Probability
Auto Trait Implementations
impl RefUnwindSafe for Probability
impl Send for Probability
impl Sync for Probability
impl Unpin for Probability
impl UnwindSafe for Probability
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