pub trait BlockRngCore {
type Item;
type Results: AsRef<[Self::Item]> + AsMut<[Self::Item]> + Default;
// Required method
fn generate(&mut self, results: &mut Self::Results);
}Expand description
A trait for RNGs which do not generate random numbers individually, but in
blocks (typically [u32; N]). This technique is commonly used by
cryptographic RNGs to improve performance.
See the module documentation for details.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".