RandomGeneration

Trait RandomGeneration 

Source
pub trait RandomGeneration: Sized {
    // Required method
    fn random<R: RngCore + CryptoRng>(rng: &mut R) -> Result<Self>;
}
Expand description

Trait for cryptographic types that can be randomly generated

Required Methods§

Source

fn random<R: RngCore + CryptoRng>(rng: &mut R) -> Result<Self>

Generate a random instance using the provided RNG

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§