pub trait Random: Sized {
// Required method
fn random(rng: &mut impl CryptoRngCore) -> Self;
}
Expand description
Random number generation support.
Required Methods§
Sourcefn random(rng: &mut impl CryptoRngCore) -> Self
fn random(rng: &mut impl CryptoRngCore) -> Self
Generate a cryptographically secure random value.
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.