Trait BlockRngCore
trait BlockRngCore
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][crate::block] documentation for details.
Associated Types
type ItemResults element type, e.g.
u32.type Results: TraitBound { trait_: Path { path: "AsRef", id: Id(2), args: Some(AngleBracketed { args: [Type(Slice(QualifiedPath { name: "Item", args: None, self_type: Generic("Self"), trait_: Some(Path { path: "", id: Id(3), args: None }) }))], constraints: [] }) }, generic_params: [], modifier: None } + TraitBound { trait_: Path { path: "AsMut", id: Id(4), args: Some(AngleBracketed { args: [Type(Slice(QualifiedPath { name: "Item", args: None, self_type: Generic("Self"), trait_: Some(Path { path: "", id: Id(3), args: None }) }))], constraints: [] }) }, generic_params: [], modifier: None } + TraitBound { trait_: Path { path: "Default", id: Id(5), args: None }, generic_params: [], modifier: None }Results type. This is the 'block' an RNG implementing
BlockRngCoregenerates, which will usually be an array like[u32; 16].
Required Methods
fn generate(self: &mut Self, results: &mut <Self as >::Results)Generate a new block of results.