logo
pub fn sample_iter<T, I, R>(
    rng: &mut R,
    iterable: I,
    amount: usize
) -> Result<Vec<T>, Vec<T>> where
    I: IntoIterator<Item = T>,
    R: Rng + ?Sized
👎 Deprecated since 0.6.0:

use IteratorRandom::choose_multiple instead

Expand description

Randomly sample amount elements from a finite iterator.

Deprecated: use IteratorRandom::choose_multiple instead.