Skip to main content

Random

Trait Random 

pub trait Random: Sized {
    // Required method
    fn random(rng: &mut impl CryptoRngCore) -> Self;
}
Expand description

Random number generation support.

Required Methods§

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.

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 for NonZero<T>
where T: Random + Zero,

Available on crate feature rand_core only.
§

impl<T> Random for Wrapping<T>
where T: Random,

Available on crate feature rand_core only.
§

impl<const LIMBS: usize> Random for Uint<LIMBS>