[−][src]Struct rand::rngs::adapter::reseeding::ReseedingCore
Fields
inner: R
reseeder: Rsdr
threshold: i64
bytes_until_reseed: i64
Methods
impl<R, Rsdr> ReseedingCore<R, Rsdr> where
R: BlockRngCore + SeedableRng,
Rsdr: RngCore,
[src]
impl<R, Rsdr> ReseedingCore<R, Rsdr> where
R: BlockRngCore + SeedableRng,
Rsdr: RngCore,
pub fn new(rng: R, threshold: u64, reseeder: Rsdr) -> Self
[src]
pub fn new(rng: R, threshold: u64, reseeder: Rsdr) -> Self
Create a new ReseedingCore
with the given parameters.
Arguments
rng
: the random number generator to use.threshold
: the number of generated bytes after which to reseed the RNG.reseeder
: the RNG to use for reseeding.
fn reseed(&mut self) -> Result<(), Error>
[src]
fn reseed(&mut self) -> Result<(), Error>
Reseed the internal PRNG.
fn reseed_and_generate(&mut self, results: &mut Self::Results)
[src]
fn reseed_and_generate(&mut self, results: &mut Self::Results)
Trait Implementations
impl<R: Debug, Rsdr: Debug> Debug for ReseedingCore<R, Rsdr>
[src]
impl<R: Debug, Rsdr: Debug> Debug for ReseedingCore<R, Rsdr>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<R, Rsdr> BlockRngCore for ReseedingCore<R, Rsdr> where
R: BlockRngCore + SeedableRng,
Rsdr: RngCore,
[src]
impl<R, Rsdr> BlockRngCore for ReseedingCore<R, Rsdr> where
R: BlockRngCore + SeedableRng,
Rsdr: RngCore,
type Item = <R as BlockRngCore>::Item
Results element type, e.g. u32
.
type Results = <R as BlockRngCore>::Results
Results type. This is the 'block' an RNG implementing BlockRngCore
generates, which will usually be an array like [u32; 16]
. Read more
fn generate(&mut self, results: &mut Self::Results)
[src]
fn generate(&mut self, results: &mut Self::Results)
Generate a new block of results.
impl<R, Rsdr> Clone for ReseedingCore<R, Rsdr> where
R: BlockRngCore + SeedableRng + Clone,
Rsdr: RngCore + Clone,
[src]
impl<R, Rsdr> Clone for ReseedingCore<R, Rsdr> where
R: BlockRngCore + SeedableRng + Clone,
Rsdr: RngCore + Clone,
fn clone(&self) -> ReseedingCore<R, Rsdr>
[src]
fn clone(&self) -> ReseedingCore<R, Rsdr>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<R, Rsdr> CryptoRng for ReseedingCore<R, Rsdr> where
R: BlockRngCore + SeedableRng + CryptoRng,
Rsdr: RngCore + CryptoRng,
[src]
impl<R, Rsdr> CryptoRng for ReseedingCore<R, Rsdr> where
R: BlockRngCore + SeedableRng + CryptoRng,
Rsdr: RngCore + CryptoRng,
Auto Trait Implementations
impl<R, Rsdr> Send for ReseedingCore<R, Rsdr> where
R: Send,
Rsdr: Send,
impl<R, Rsdr> Send for ReseedingCore<R, Rsdr> where
R: Send,
Rsdr: Send,
impl<R, Rsdr> Sync for ReseedingCore<R, Rsdr> where
R: Sync,
Rsdr: Sync,
impl<R, Rsdr> Sync for ReseedingCore<R, Rsdr> where
R: Sync,
Rsdr: Sync,
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
type Owned = T
fn to_owned(&self) -> T
[src]
fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)
[src]
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
ⓘImportant traits for &'a mut Rfn borrow(&self) -> &T
[src]
fn borrow(&self) -> &T
Immutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
ⓘImportant traits for &'a mut Rfn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more