pub struct Rng { /* private fields */ }Expand description
A deterministic pseudo-random number generator.
Internally splitmix64. Cheap to construct, no allocation.
§Example
use dev_fixtures::mock::Rng;
let mut a = Rng::seeded(42);
let mut b = Rng::seeded(42);
assert_eq!(a.next_u64(), b.next_u64());Implementations§
Auto Trait Implementations§
impl Freeze for Rng
impl RefUnwindSafe for Rng
impl Send for Rng
impl Sync for Rng
impl Unpin for Rng
impl UnsafeUnpin for Rng
impl UnwindSafe for Rng
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