# Struct proptest::option::Probability

source · `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

§#### type Parameters = ()

#### type Parameters = ()

The type of parameters that

`arbitrary_with`

accepts for configuration
of the generated `Strategy`

. Parameters must implement `Default`

.§#### 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

source§#### fn 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 `==`

.### 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