Trait Generator

pub trait Generator

A random (block) generator

Associated Types

type Output;

The output type.

For use with rand_core::block code this must be [u32; _] or [u64; _].

Required Methods

fn generate(&mut self, output: &mut Self::Output)

Generate a new block of output.

This must fill output with random data.

Provided Methods

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.