#[repr(u8)]pub enum PieceType {
PAWN = 1,
KNIGHT = 2,
BISHOP = 4,
ROOK = 8,
QUEEN = 16,
KING = 32,
}Variants§
Implementations§
Source§impl PieceType
impl PieceType
Sourcepub fn from_value(value: u8) -> Option<PieceType>
pub fn from_value(value: u8) -> Option<PieceType>
Convert a value to its corresponding PieceType type
pub fn from_string(value: &str) -> Option<PieceType>
pub fn from_string_verbose(value: &str) -> Option<PieceType>
pub fn to_string(&self) -> Option<&str>
pub fn to_string_verbose(&self) -> Option<&str>
Trait Implementations§
Source§impl Ord for PieceType
impl Ord for PieceType
Source§impl PartialOrd for PieceType
impl PartialOrd for PieceType
impl Copy for PieceType
impl Eq 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 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