Skip to main content

Rng

Trait Rng 

Source
pub trait Rng {
    // Required method
    fn fill_bytes(&mut self, dest: &mut [u8]);
}
Expand description

Trait for random number generation. Callers provide an implementation; in std builds this wraps OS randomness.

Required Methods§

Source

fn fill_bytes(&mut self, dest: &mut [u8])

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl Rng for FixedRng

Source§

impl Rng for OsRng

Available on crate feature std only.