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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)