pub trait IndexedMutRandom: IndexedRandom + IndexMut<usize> {
// Provided method
fn choose_mut<R>(&mut self, rng: &mut R) -> Option<&mut Self::Output>
where R: Rng + ?Sized { ... }
}Expand description
Extension trait on indexable lists, providing random sampling methods.
This trait is implemented automatically for every type implementing
IndexedRandom and [std::ops::IndexMut<usize>].
Provided Methods§
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.