pub struct Deck<DeckType> { /* private fields */ }Implementations§
Source§impl<DeckType> Deck<DeckType>
impl<DeckType> Deck<DeckType>
pub fn id(&self) -> DeckID
pub fn size(&self) -> usize
pub fn top(&self) -> Option<CardID>
pub fn deck_type(&self) -> DeckType
pub fn owner(&self) -> Option<PlayerID>
pub fn all(&self) -> &[CardID]
pub fn draw(&mut self) -> Option<CardID>
pub fn remove_card_from_deck(&mut self, card: CardID)
pub fn put_card_on_top(&mut self, card: CardID)
pub fn put_card_on_bottom(&mut self, card: CardID)
pub fn shuffle<R: SliceRandom + Rng>(&mut self, rng: &mut R)
Trait Implementations§
Source§impl<'de, DeckType> Deserialize<'de> for Deck<DeckType>where
DeckType: Deserialize<'de>,
impl<'de, DeckType> Deserialize<'de> for Deck<DeckType>where
DeckType: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<DeckType: Eq> Eq for Deck<DeckType>
impl<DeckType> StructuralPartialEq for Deck<DeckType>
Auto Trait Implementations§
impl<DeckType> Freeze for Deck<DeckType>where
DeckType: Freeze,
impl<DeckType> RefUnwindSafe for Deck<DeckType>where
DeckType: RefUnwindSafe,
impl<DeckType> Send for Deck<DeckType>where
DeckType: Send,
impl<DeckType> Sync for Deck<DeckType>where
DeckType: Sync,
impl<DeckType> Unpin for Deck<DeckType>where
DeckType: Unpin,
impl<DeckType> UnwindSafe for Deck<DeckType>where
DeckType: UnwindSafe,
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