#[non_exhaustive]#[repr(u8)]pub enum PieceType {
Pawn = 0,
Knight = 1,
Bishop = 2,
Rook = 3,
Queen = 4,
Commoner = 5,
}Expand description
A piece type (pawn, knight, bishop, rook, queen, or commoner).
In atomic chess, a commoner moves like a king and is pseudo-royal: losing all commoners loses the game.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Trait Implementations§
impl Copy for PieceType
impl Eq for PieceType
Source§impl Ord for PieceType
impl Ord for PieceType
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for PieceType
impl PartialOrd for PieceType
impl StructuralPartialEq for PieceType
Auto Trait Implementations§
impl Freeze for PieceType
impl RefUnwindSafe for PieceType
impl Send for PieceType
impl Sync for PieceType
impl Unpin for PieceType
impl UnsafeUnpin for PieceType
impl UnwindSafe for PieceType
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