clock-rand 1.0.3

Next-generation random number generation with blockchain-aware RNGs, fork detection, and cryptographic security
Documentation
1
2
3
4
5
6
7
8
9
10
11
//! Distribution traits and implementations

pub mod uniform;

pub use uniform::Uniform;

/// Trait for generating random values from a distribution
pub trait Distribution<T> {
    /// Generate a random value from this distribution
    fn sample<R: crate::traits::Rng>(&self, rng: &mut R) -> T;
}