pub trait Random {
// Required method
fn random(rng: impl CryptoRng) -> Self;
}Expand description
A trait for objects that can be randomly sampled.
The only stipulation about this sampling process is that the result should be indistinguishable from one sampled uniformly at random.
Beyond that, we don’t assume that we don’t learn other things about the object as the sampler.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".