# [−][src]Struct proptest::option::Probability

A probability in the range `[0.0, 1.0]`

with a default of `0.5`

.

## Implementations

`impl Probability`

[src]

`pub fn new(prob: f64) -> Self`

[src]

`pub fn with<X>(self, and: X) -> (Self, X)`

[src]

Merges self together with some other argument producing a product
type expected by some implementations of `A: Arbitrary`

in
`A::Parameters`

. This can be more ergonomic to work with and may
help type inference.

`pub fn lift<X: Default>(self) -> (Self, X)`

[src]

Merges self together with some other argument generated with a
default value producing a product type expected by some
implementations of `A: Arbitrary`

in `A::Parameters`

.
This can be more ergonomic to work with and may help type inference.

## Trait Implementations

`impl Arbitrary for Probability`

[src]

`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>, Self>`

`fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy`

[src]

`fn arbitrary() -> Self::Strategy`

[src]

`impl Clone for Probability`

[src]

`fn clone(&self) -> Probability`

[src]

`pub fn clone_from(&mut self, source: &Self)`

1.0.0[src]

`impl Copy for Probability`

[src]

`impl Debug for Probability`

[src]

`impl Default for Probability`

[src]

`impl From<Probability> for f64`

[src]

`fn from(p: Probability) -> Self`

[src]

`impl From<f64> for Probability`

[src]

`impl PartialEq<Probability> for Probability`

[src]

`fn eq(&self, other: &Probability) -> bool`

[src]

`fn ne(&self, other: &Probability) -> bool`

[src]

`impl StructuralPartialEq for Probability`

[src]

## Auto Trait Implementations

`impl RefUnwindSafe for Probability`

[src]

`impl Send for Probability`

[src]

`impl Sync for Probability`

[src]

`impl Unpin for Probability`

[src]

`impl UnwindSafe for Probability`

[src]

## Blanket Implementations

`impl<T> Any for T where`

T: 'static + ?Sized,

[src]

T: 'static + ?Sized,

`impl<T> Borrow<T> for T where`

T: ?Sized,

[src]

T: ?Sized,

`impl<T> BorrowMut<T> for T where`

T: ?Sized,

[src]

T: ?Sized,

`pub fn borrow_mut(&mut self) -> &mut T`

[src]

`impl<T> From<T> for T`

[src]

`impl<T, U> Into<U> for T where`

U: From<T>,

[src]

U: From<T>,

`impl<T> ToOwned for T where`

T: Clone,

[src]

T: Clone,

`type Owned = T`

The resulting type after obtaining ownership.

`pub fn to_owned(&self) -> T`

[src]

`pub fn clone_into(&self, target: &mut T)`

[src]

`impl<T, U> TryFrom<U> for T where`

U: Into<T>,

[src]

U: Into<T>,

`type Error = Infallible`

The type returned in the event of a conversion error.

`pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>`

[src]

`impl<T, U> TryInto<U> for T where`

U: TryFrom<T>,

[src]

U: TryFrom<T>,

`type Error = <U as TryFrom<T>>::Error`

The type returned in the event of a conversion error.

`pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>`

[src]

`impl<V, T> VZip<V> for T where`

V: MultiLane<T>,

V: MultiLane<T>,