Trait SliceRandom

Source
pub trait SliceRandom {
    // Required method
    fn shuffle<T>(&mut self, arr: &mut [T]);

    // Provided method
    fn choose_multiple<'a, T>(
        &mut self,
        arr: &'a [T],
        amount: usize,
    ) -> Take<IntoIter<&'a T>> { ... }
}

Required Methods§

Source

fn shuffle<T>(&mut self, arr: &mut [T])

Provided Methods§

Source

fn choose_multiple<'a, T>( &mut self, arr: &'a [T], amount: usize, ) -> Take<IntoIter<&'a T>>

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§