Struct flow_sdk::algorithms::rand::ReseedingRng [−][src]
pub struct ReseedingRng<R, Rsdr>(_)
where
R: BlockRngCore + SeedableRng,
Rsdr: RngCore;
Implementations
Trait Implementations
impl<R, Rsdr> Clone for ReseedingRng<R, Rsdr> where
R: Clone + BlockRngCore + SeedableRng,
Rsdr: Clone + RngCore,
impl<R, Rsdr> Clone for ReseedingRng<R, Rsdr> where
R: Clone + BlockRngCore + SeedableRng,
Rsdr: Clone + RngCore,
impl<R, Rsdr> Debug for ReseedingRng<R, Rsdr> where
R: Debug + BlockRngCore + SeedableRng,
Rsdr: Debug + RngCore,
impl<R, Rsdr> Debug for ReseedingRng<R, Rsdr> where
R: Debug + BlockRngCore + SeedableRng,
Rsdr: Debug + RngCore,
impl<R, Rsdr> RngCore for ReseedingRng<R, Rsdr> where
Rsdr: RngCore,
R: BlockRngCore<Item = u32> + SeedableRng,
<R as BlockRngCore>::Results: AsRef<[u32]>,
<R as BlockRngCore>::Results: AsMut<[u32]>,
impl<R, Rsdr> RngCore for ReseedingRng<R, Rsdr> where
Rsdr: RngCore,
R: BlockRngCore<Item = u32> + SeedableRng,
<R as BlockRngCore>::Results: AsRef<[u32]>,
<R as BlockRngCore>::Results: AsMut<[u32]>,
impl<R, Rsdr> CryptoRng for ReseedingRng<R, Rsdr> where
R: BlockRngCore + SeedableRng + CryptoRng,
Rsdr: RngCore + CryptoRng,
Auto Trait Implementations
impl<R, Rsdr> RefUnwindSafe for ReseedingRng<R, Rsdr> where
R: RefUnwindSafe,
Rsdr: RefUnwindSafe,
<R as BlockRngCore>::Results: RefUnwindSafe,
impl<R, Rsdr> Send for ReseedingRng<R, Rsdr> where
R: Send,
Rsdr: Send,
<R as BlockRngCore>::Results: Send,
impl<R, Rsdr> Sync for ReseedingRng<R, Rsdr> where
R: Sync,
Rsdr: Sync,
<R as BlockRngCore>::Results: Sync,
impl<R, Rsdr> Unpin for ReseedingRng<R, Rsdr> where
R: Unpin,
Rsdr: Unpin,
<R as BlockRngCore>::Results: Unpin,
impl<R, Rsdr> UnwindSafe for ReseedingRng<R, Rsdr> where
R: UnwindSafe,
Rsdr: UnwindSafe,
<R as BlockRngCore>::Results: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Wrap the input message T
in a tonic::Request
fn gen_range<T, B1, B2>(&mut self, low: B1, high: B2) -> T where
T: SampleUniform,
B1: SampleBorrow<T>,
B2: SampleBorrow<T>,
fn gen_range<T, B1, B2>(&mut self, low: B1, high: B2) -> T where
T: SampleUniform,
B1: SampleBorrow<T>,
B2: SampleBorrow<T>,
Generate a random value in the range [low
, high
), i.e. inclusive of
low
and exclusive of high
. Read more
Sample a new value, using the given distribution. Read more
fn sample_iter<T, D>(&'a mut self, distr: &'a D) -> DistIter<'a, D, Self, T>ⓘ where
D: Distribution<T>,
fn sample_iter<T, D>(&'a mut self, distr: &'a D) -> DistIter<'a, D, Self, T>ⓘ where
D: Distribution<T>,
Create an iterator that generates values using the given distribution. Read more
Fill dest
entirely with random bytes (uniform value distribution),
where dest
is any type supporting AsByteSliceMut
, namely slices
and arrays over primitive integer types (i8
, i16
, u32
, etc.). Read more
Fill dest
entirely with random bytes (uniform value distribution),
where dest
is any type supporting AsByteSliceMut
, namely slices
and arrays over primitive integer types (i8
, i16
, u32
, etc.). Read more
Return a bool with a probability p
of being true. Read more
Return a bool with a probability of numerator/denominator
of being
true. I.e. gen_ratio(2, 3)
has chance of 2 in 3, or about 67%, of
returning true. If numerator == denominator
, then the returned value
is guaranteed to be true
. If numerator == 0
, then the returned
value is guaranteed to be false
. Read more
use SliceRandom::choose instead
Return a random element from values
. Read more
use SliceRandom::choose_mut instead
Return a mutable pointer to a random element from values
. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more