Trait SliceRandom

Source
pub trait SliceRandom {
    // Required method
    fn shuffle<R: Rng>(&mut self, rng: &mut R);
}
Expand description

Trait for randomizing slices.

Required Methods§

Source

fn shuffle<R: Rng>(&mut self, rng: &mut R)

Shuffle the slice in place using the provided RNG.

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.

Implementations on Foreign Types§

Source§

impl<T> SliceRandom for [T]

Source§

fn shuffle<R: Rng>(&mut self, rng: &mut R)

Implementors§