pub fn random_index<R>(rng: &mut R, length: usize) -> usize where
    R: Rng + Sized
Expand description

Generates a random index into a slice of given length using the given Prng.