pub trait Random {
// Required methods
fn random() -> Self;
fn random_range_max(max: Self) -> Self;
fn random_range(min: Self, max: Self) -> Self;
}Expand description
Trait for generating random values
Required Methods§
Sourcefn random_range_max(max: Self) -> Self
fn random_range_max(max: Self) -> Self
Get a random value, expanded to another range.
Sourcefn random_range(min: Self, max: Self) -> Self
fn random_range(min: Self, max: Self) -> Self
Get a random value, expanded to another range.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".