Trait Random

Source
pub trait Random: Sized {
    // Required method
    fn random(rng: &mut (impl RngCore + ?Sized)) -> Self;
}
Available on crate feature rand_core only.
Expand description

Random number generation support.

Required Methods§

Source

fn random(rng: &mut (impl RngCore + ?Sized)) -> Self

Generate a random value.

If rng is a CSRNG, the generation is cryptographically secure as well.

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§

Source§

impl Random for Limb

Source§

impl<MOD, const LIMBS: usize> Random for ConstMontyForm<MOD, LIMBS>
where MOD: ConstMontyParams<LIMBS>,

Source§

impl<T> Random for NonZero<T>
where T: Random + Zero,

Source§

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

Source§

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

Source§

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

Source§

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