Trait rand_pop::RandPop [] [src]

pub trait RandPop: Sized {
    type Item;
    fn rand_pop<R: Rng>(&mut self, rng: &mut R) -> Option<Self::Item>;

    fn rand_iter<R: Rng>(self, rng: &mut R) -> RandIter<Self, R> { ... }
}

Interface for randomly removing elements from a container.

Associated Types

Type of the item that's removed from the container.

Required Methods

Randomly removes an item from the container; does not necessarily preserve order.

Provided Methods

Randomly iterates through the items in this container, consuming the container.

Implementors