[−][src]Struct rand_seeder::Seeder
A universal seeder.
Seeder
can be used to seed any SeedableRng
from any hashable value. It
is portable and reproducible, and should turn any input into a good RNG
seed. It is intended for use in simulations and games where reproducibility
is important.
We do not recommend using Seeder
for cryptographic applications and
strongly advise against usage for authentication (password hashing).
Example:
use rand_core::RngCore; use rand_seeder::{Seeder, SipRng}; // Use any SeedableRng you like in place of SipRng: let mut rng: SipRng = Seeder::from("stripy zebra").make_rng(); println!("First value: {}", rng.next_u32());
Methods
impl Seeder
[src]
pub fn make_rng<R: SeedableRng>(&mut self) -> R
[src]
Trait Implementations
impl<H: Hash> From<H> for Seeder
[src]
impl Debug for Seeder
[src]
impl Clone for Seeder
[src]
fn clone(&self) -> Seeder
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> From<!> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,