pub trait Generator {
type Output;
// Required method
fn generate(&mut self, output: &mut Self::Output);
// Provided method
fn drop(&mut self, output: &mut Self::Output) { ... }
}Expand description
A random (block) generator
Required Associated Types§
Sourcetype Output
type Output
The output type.
For use with rand_core::block code this must be [u32; _] or [u64; _].
Required Methods§
Provided Methods§
Sourcefn drop(&mut self, output: &mut Self::Output)
fn drop(&mut self, output: &mut Self::Output)
Destruct the output buffer
This method is called on Drop of the Self::Output buffer.
The default implementation does nothing.