Trait Samplable

Source
pub trait Samplable {
    // Required method
    fn random<R>(rng: &mut R) -> Self
       where R: RngCore;
}
Expand description

Type can be uniformely sampled from source of randomness

Required Methods§

Source

fn random<R>(rng: &mut R) -> Self
where R: RngCore,

Uniformely samples a random value of Self

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.

Implementations on Foreign Types§

Source§

impl Samplable for Scalar

Source§

fn random<R>(rng: &mut R) -> Scalar
where R: RngCore,

Source§

impl<E> Samplable for RustCryptoScalar<E>
where E: CurveArithmetic,

Source§

fn random<R>(rng: &mut R) -> RustCryptoScalar<E>
where R: RngCore,

Implementors§