pub struct ForcedRng<R: RngCore>(_);

Implementations§

source§

impl<R: RngCore> ForcedRng<R>

source

pub fn new(rng: R) -> Self

Trait Implementations§

source§

impl<R: Debug + RngCore> Debug for ForcedRng<R>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<R: RngCore> Driver for ForcedRng<R>

source§

fn gen_u8(&mut self, min: Bound<&u8>, max: Bound<&u8>) -> Option<u8>

source§

fn gen_i8(&mut self, min: Bound<&i8>, max: Bound<&i8>) -> Option<i8>

source§

fn gen_u16(&mut self, min: Bound<&u16>, max: Bound<&u16>) -> Option<u16>

source§

fn gen_i16(&mut self, min: Bound<&i16>, max: Bound<&i16>) -> Option<i16>

source§

fn gen_u32(&mut self, min: Bound<&u32>, max: Bound<&u32>) -> Option<u32>

source§

fn gen_i32(&mut self, min: Bound<&i32>, max: Bound<&i32>) -> Option<i32>

source§

fn gen_u64(&mut self, min: Bound<&u64>, max: Bound<&u64>) -> Option<u64>

source§

fn gen_i64(&mut self, min: Bound<&i64>, max: Bound<&i64>) -> Option<i64>

source§

fn gen_u128(&mut self, min: Bound<&u128>, max: Bound<&u128>) -> Option<u128>

source§

fn gen_i128(&mut self, min: Bound<&i128>, max: Bound<&i128>) -> Option<i128>

source§

fn gen_usize(&mut self, min: Bound<&usize>, max: Bound<&usize>) -> Option<usize>

source§

fn gen_isize(&mut self, min: Bound<&isize>, max: Bound<&isize>) -> Option<isize>

source§

fn gen_f32(&mut self, min: Bound<&f32>, max: Bound<&f32>) -> Option<f32>

source§

fn gen_f64(&mut self, min: Bound<&f64>, max: Bound<&f64>) -> Option<f64>

source§

fn gen_char(&mut self, min: Bound<&char>, max: Bound<&char>) -> Option<char>

source§

fn gen_bool(&mut self, probability: Option<f32>) -> Option<bool>

source§

fn gen_from_bytes<Gen, T>( &mut self, len: RangeInclusive<usize>, gen: Gen ) -> Option<T>where Gen: FnMut(&[u8]) -> Option<(usize, T)>,

Generate a value from bytes off this generator Read more
source§

fn gen<T: TypeGenerator>(&mut self) -> Option<T>

Generate a value with type T

Auto Trait Implementations§

§

impl<R> RefUnwindSafe for ForcedRng<R>where R: RefUnwindSafe,

§

impl<R> Send for ForcedRng<R>where R: Send,

§

impl<R> Sync for ForcedRng<R>where R: Sync,

§

impl<R> Unpin for ForcedRng<R>where R: Unpin,

§

impl<R> UnwindSafe for ForcedRng<R>where R: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.