pub struct MeowRng { /* private fields */ }
Expand description
A pseudo-random number generator.
This RNG is initialized with a seed, and from that point generates bits deterministically from that seed. Crucially, these bits are determined solely by that seed, and not by how they’re pulled from the RNG. Pulling bytes by chunks of 8, or chunks of 16, or 32, etc. will yield the same bytes.
Treating the RNG as an unstructured stream makes it more easy to produce consistent results. Refactoring the code to use a larger buffer won’t change the results, for example.
Implementations§
Trait Implementations§
Source§impl RngCore for MeowRng
impl RngCore for MeowRng
Source§fn fill_bytes(&mut self, dest: &mut [u8])
fn fill_bytes(&mut self, dest: &mut [u8])
Fill
dest
with random data. Read moreimpl CryptoRng for MeowRng
Auto Trait Implementations§
impl Freeze for MeowRng
impl RefUnwindSafe for MeowRng
impl Send for MeowRng
impl Sync for MeowRng
impl Unpin for MeowRng
impl UnwindSafe for MeowRng
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
Source§impl<T> CryptoRngCore for T
impl<T> CryptoRngCore for T
Source§fn as_rngcore(&mut self) -> &mut dyn RngCore
fn as_rngcore(&mut self) -> &mut dyn RngCore
Upcast to an
RngCore
trait object.