pub struct Surrogate<'a, 'd> { /* private fields */ }
Expand description

Encapsulates the state of the mock and a reference to the next_u128 delegate, so that it can be invoked from inside the mock by, for example, another delegate.

Implementations

Obtains the mock state.

Trait Implementations

Returns the next random u64.

Returns the next random u128.

Returns the next random u16.

Returns the next random u32.

Returns the next random usize.

Returns a bool with a probability p of being true. Read more

Generates a random number in 0..lim.

Generates a random number in 0..lim.

Generates a random number in 0..lim.

Generates a random number in 0..lim.

Generates a random number in 0..lim.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Generates a random number in 0..N.

Generates a random number in 0..N.

Generates a random number in 0..N.

Generates a random number in 0..N.

Generates a random number in 0..N.

Generates a random number in the given range.

Generates a random number in the given range.

Generates a random number in the given range.

Generates a random number in the given range.

Generates a random number in the given range.

Generates a random number in the given range.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.