pub enum Colour {
Black,
Red,
}Expand description
Indicates the colour of a card.
The suits Club and Spade are black, whereas Heart and Diamond are red.
§Examples
use freecell::{Card, Colour, Suit, ACE, KING};
let black_card = Card {suit: Suit::Spade, rank: ACE};
assert_eq!(Colour::Black, black_card.suit.colour());
let red_card = Card {suit: Suit::Heart, rank: KING};
assert_eq!(Colour::Red, red_card.suit.colour());Variants§
Trait Implementations§
impl Copy for Colour
impl Eq for Colour
impl StructuralPartialEq for Colour
Auto Trait Implementations§
impl Freeze for Colour
impl RefUnwindSafe for Colour
impl Send for Colour
impl Sync for Colour
impl Unpin for Colour
impl UnwindSafe for Colour
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