pub trait GenerateRandomCollection<T>where
T: GenerateRandom,{
// Required method
fn gen_random(rng: &mut impl Rng, amount: usize) -> Self;
}
Expand description
Blanket trait used on collections that contain objects implementing GenerateRandom
Required Methods§
Sourcefn gen_random(rng: &mut impl Rng, amount: usize) -> Self
fn gen_random(rng: &mut impl Rng, amount: usize) -> Self
Generate a random collection of the inner objects with a given amount
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.