GenerateRandomCollection

Trait GenerateRandomCollection 

Source
pub trait GenerateRandomCollection<T>
where T: GenerateRandom,
{ // Required method fn gen_random(rng: &mut impl Rng, amount: usize) -> Self; }
Available on crate feature genrand only.
Expand description

Blanket trait used on collections that contain objects implementing GenerateRandom

Required Methods§

Source

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.

Implementors§

Source§

impl<C, T> GenerateRandomCollection<T> for C
where C: FromIterator<T>, T: GenerateRandom,

Available on non-crate feature rayon only.