pub struct RapidRng { /* private fields */ }Expand description
A random number generator that uses the rapidhash mixing algorithm.
This deterministic RNG is optimized for speed and throughput. This is not a cryptographic random number generator.
This RNG is compatible with [rand_core::RngCore] and [rand_core::SeedableRng].
§Example
use rapidhash::rng::RapidRng;
let mut rng = RapidRng::default();
println!("{}", rng.next());Implementations§
Trait Implementations§
impl Copy for RapidRng
Source§impl Default for RapidRng
Available on neither docsrs, nor crate feature std and neither miri, nor zero knowledge Virtual Machine, nor target_family=wasm and target_os=unknown.
impl Default for RapidRng
Available on neither
docsrs, nor crate feature std and neither miri, nor zero knowledge Virtual Machine, nor target_family=wasm and target_os=unknown.impl Eq for RapidRng
Source§impl Ord for RapidRng
impl Ord for RapidRng
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for RapidRng
impl PartialOrd for RapidRng
impl StructuralPartialEq for RapidRng
Auto Trait Implementations§
impl Freeze for RapidRng
impl RefUnwindSafe for RapidRng
impl Send for RapidRng
impl Sync for RapidRng
impl Unpin for RapidRng
impl UnsafeUnpin for RapidRng
impl UnwindSafe for RapidRng
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more