pub struct Probability(/* private fields */);
Expand description
A probability in the range [0.0, 1.0]
with a default of 0.5
.
Implementations§
Source§impl Probability
impl Probability
Trait Implementations§
Source§impl Arbitrary for Probability
impl Arbitrary for Probability
Source§type Parameters = ()
type Parameters = ()
The type of parameters that
arbitrary_with
accepts for configuration
of the generated Strategy
. Parameters must implement Default
.Source§type Strategy = MapInto<RangeInclusive<f64>, Probability>
type Strategy = MapInto<RangeInclusive<f64>, Probability>
The type of
Strategy
used to generate values of type Self
.Source§fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy
fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy
Source§impl Clone for Probability
impl Clone for Probability
Source§fn clone(&self) -> Probability
fn clone(&self) -> Probability
Returns a copy 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 Debug for Probability
impl Debug for Probability
Source§impl Default for Probability
impl Default for Probability
Source§impl From<Probability> for f64
impl From<Probability> for f64
Source§fn from(p: Probability) -> Self
fn from(p: Probability) -> Self
Converts to this type from the input type.
Source§impl From<f64> for Probability
impl From<f64> for Probability
Source§impl PartialEq for Probability
impl PartialEq for Probability
impl Copy for Probability
impl StructuralPartialEq for Probability
Auto Trait Implementations§
impl Freeze for Probability
impl RefUnwindSafe for Probability
impl Send for Probability
impl Sync for Probability
impl Unpin for Probability
impl UnwindSafe for Probability
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