Struct prop_check_rs::rng::RNG

source ·
pub struct RNG { /* private fields */ }

Implementations§

source§

impl RNG

source

pub fn new() -> Self

source

pub fn new_with_seed(seed: u64) -> Self

source

pub fn i32_f32(&self) -> ((i32, f32), Self)

source

pub fn f32_i32(&self) -> ((f32, i32), Self)

source

pub fn f32_3(&self) -> ((f32, f32, f32), Self)

source

pub fn i32s(self, count: u32) -> (Vec<i32>, Self)

source

pub fn unit<A>(a: A) -> Box<dyn FnMut(RNG) -> (A, RNG)>where
A: Clone + 'static,

source

pub fn sequence<A, F>(fs: Vec<F>) -> Box<dyn FnMut(RNG) -> (Vec<A>, RNG)>where
A: Clone + 'static,
F: FnMut(RNG) -> (A, RNG) + 'static,

source

pub fn int_value() -> Box<dyn FnMut(RNG) -> (i32, RNG)>

source

pub fn double_value() -> Box<dyn FnMut(RNG) -> (f32, RNG)>

source

pub fn map<A, B, F1, F2>(s: F1, f: F2) -> Box<dyn FnMut(RNG) -> (B, RNG)>where
F1: FnMut(RNG) -> (A, RNG) + 'static,
F2: FnMut(A) -> B + 'static,

source

pub fn map2<F1, F2, F3, A, B, C>(
ra: F1,
rb: F2,
f: F3
) -> Box<dyn FnMut(RNG) -> (C, RNG)>where
F1: FnMut(RNG) -> (A, RNG) + 'static,
F2: FnMut(RNG) -> (B, RNG) + 'static,
F3: FnMut(A, B) -> C + 'static,

source

pub fn both<F1, F2, A, B>(ra: F1, rb: F2) -> Box<dyn FnMut(RNG) -> ((A, B), RNG)>where
F1: FnMut(RNG) -> (A, RNG) + 'static,
F2: FnMut(RNG) -> (B, RNG) + 'static,

source

pub fn rand_int_double() -> Box<dyn FnMut(RNG) -> ((i32, f32), RNG)>

source

pub fn rand_double_int<'a>() -> Box<dyn FnMut(RNG) -> ((f32, i32), RNG)>

source

pub fn flat_map<A, B, F, GF, BF>(f: F, g: GF) -> Box<dyn FnMut(RNG) -> (B, RNG)>where
F: FnMut(RNG) -> (A, RNG) + 'static,
BF: FnMut(RNG) -> (B, RNG) + 'static,
GF: FnMut(A) -> BF + 'static,

Trait Implementations§

source§

impl Clone for RNG

source§

fn clone(&self) -> RNG

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl Debug for RNG

source§

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

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

impl Default for RNG

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl NextRandValue for RNG

source§

fn next_i64(&self) -> (i64, Self)

source§

fn next_u64(&self) -> (u64, Self)

source§

fn next_i32(&self) -> (i32, Self)

source§

fn next_u32(&self) -> (u32, Self)

source§

fn next_i16(&self) -> (i16, Self)

source§

fn next_u16(&self) -> (u16, Self)

source§

fn next_i8(&self) -> (i8, Self)

source§

fn next_u8(&self) -> (u8, Self)

source§

fn next_f64(&self) -> (f64, Self)

source§

fn next_f32(&self) -> (f32, Self)

source§

fn next_bool(&self) -> (bool, Self)

source§

impl PartialEq<RNG> for RNG

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for RNG

Auto Trait Implementations§

§

impl RefUnwindSafe for RNG

§

impl Send for RNG

§

impl Sync for RNG

§

impl Unpin for RNG

§

impl UnwindSafe for RNG

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> ToOwned for Twhere
T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

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

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
§

impl<V, T> VZip<V> for Twhere
V: MultiLane<T>,

§

fn vzip(self) -> V