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".
Implementors§
impl Random for Limb
impl<MOD, const LIMBS: usize> Random for Residue<MOD, LIMBS>where
MOD: ResidueParams<LIMBS>,
Available on crate feature
rand_core only.impl<T: Random> Random for Wrapping<T>
Available on crate feature
rand_core only.impl<T> Random for NonZero<T>
Available on crate feature
rand_core only.