Struct HasherRng

pub struct HasherRng<H = RandomState> { /* private fields */ }

A Rng implementation that uses a Hasher to generate the random values. The implementation uses an internal counter to pass to the hasher for each iteration of Rng::next_u64.

Default

This hasher has a default type of RandomState which just uses the libstd method of getting a random u64.

Implementations

impl HasherRng

fn new() -> Self

Create a new default HasherRng.

impl<H> HasherRng<H>

fn with_hasher(hasher: H) -> Self

Create a new HasherRng with the provided hasher.

Trait Implementations

impl Default for HasherRng

fn default() -> Self

impl<H> Rng for HasherRng<H> where H: BuildHasher,

fn next_u64(&mut self) -> u64

impl<H: Clone> Clone for HasherRng<H>

fn clone(&self) -> Self

impl<H: Debug> Debug for HasherRng<H>

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

Auto Trait Implementations

impl<H> Freeze for HasherRng<H> where H: Freeze,

impl<H> RefUnwindSafe for HasherRng<H> where H: RefUnwindSafe,

impl<H> Send for HasherRng<H> where H: Send,

impl<H> Sync for HasherRng<H> where H: Sync,

impl<H> Unpin for HasherRng<H> where H: Unpin,

impl<H> UnsafeUnpin for HasherRng<H> where H: UnsafeUnpin,

impl<H> UnwindSafe for HasherRng<H> where H: UnwindSafe,

Blanket Implementations

impl<T> Any for HasherRng<H> where T: 'static + ?Sized,

impl<T> Borrow<T> for HasherRng<H> where T: ?Sized,

impl<T> BorrowMut<T> for HasherRng<H> where T: ?Sized,

impl<T> CloneToUninit for HasherRng<H> where T: Clone,

impl<T> From<T> for HasherRng<H>

impl<T> Instrument for HasherRng<H>

impl<T> ToOwned for HasherRng<H> where T: Clone,

impl<T> WithSubscriber for HasherRng<H>

impl<T, U> Into<U> for HasherRng<H> where U: From<T>,

impl<T, U> TryFrom<U> for HasherRng<H> where U: Into<T>,

impl<T, U> TryInto<U> for HasherRng<H> where U: TryFrom<T>,