pub enum Deck<const CARDS: u8> {}Expand description
Origin marker for card-deck entropy. CARDS is the deck size; the
entropy a full shuffle delivers is log₂(CARDS!) bits.
Deck<32>— Skat. ~118 bits, too small for BIP39.Deck<40>— Spanish baraja, stripped. ~159 bits, 12-word only.Deck<48>— Pinochle / Spanish baraja (full). ~202 bits, 12-word only.Deck<52>— standard poker / playing cards. ~226 bits, 12-word only; never use for 24-word mnemonics.Deck<58>— smallest deck that clears 256 bits (~260). First size that supports 24-word mnemonics.Deck<78>— Tarot. ~380 bits, 12- or 24-word.Deck<108>— UNO (pre-2018). ~575 bits, 12- or 24-word.Deck<112>— UNO (2018+). ~599 bits, 12- or 24-word.
Greater the deck, fewer the draws, but the harder the UX.
Auto Trait Implementations§
impl<const CARDS: u8> Freeze for Deck<CARDS>
impl<const CARDS: u8> RefUnwindSafe for Deck<CARDS>
impl<const CARDS: u8> Send for Deck<CARDS>
impl<const CARDS: u8> Sync for Deck<CARDS>
impl<const CARDS: u8> Unpin for Deck<CARDS>
impl<const CARDS: u8> UnsafeUnpin for Deck<CARDS>
impl<const CARDS: u8> UnwindSafe for Deck<CARDS>
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