pub trait RandomSource {
// Required method
fn gen_below(&mut self, max_exclusive: u32) -> u32;
}Expand description
A source of bounded random integers in 0..max_exclusive.
Implement this for deterministic test doubles, mirroring the injectable
RandomSource of the TypeScript packages.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".