Skip to main content

RandomSource

Trait RandomSource 

Source
pub trait RandomSource {
    // Required method
    fn next_u64(&mut self) -> u64;
}
Expand description

A minimal source of random bits for document generation.

Implement this trait to inject an application-provided random source into the *_with_rng generation functions. Document generation does not require cryptographically secure randomness, but generated values must not be used as secrets.

Required Methods§

Source

fn next_u64(&mut self) -> u64

Returns the next 64 random bits.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§