pub struct SliceDeck<'a, R: Rng, T> { /* private fields */ }
Expand description
a Deck
that randomly draws elements from a slice.
note that this works by randomly picking an index of the slice, so it is possible to draw two card with equal value if (and only if) the slice contains two elements of equal value.
Trait Implementations§
Auto Trait Implementations§
impl<'a, R, T> RefUnwindSafe for SliceDeck<'a, R, T>where
R: RefUnwindSafe,
T: RefUnwindSafe,
impl<'a, R, T> Send for SliceDeck<'a, R, T>
impl<'a, R, T> Sync for SliceDeck<'a, R, T>
impl<'a, R, T> Unpin for SliceDeck<'a, R, T>where
R: Unpin,
impl<'a, R, T> UnwindSafe for SliceDeck<'a, R, T>where
R: UnwindSafe,
T: RefUnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more