1 2 3 4 5 6 7 8 9 10 11 12 13 14
//! RNG abstract use core::ops::DerefMut; use rand_chacha::ChaCha12Rng; /// RNG singleton pub trait RngSingleton { /// &mut ChaCha12Rng type D: DerefMut<Target = ChaCha12Rng>; /// Singleton instance fn instance() -> Self::D; }