pub enum Color {
Black = 0,
White = 1,
}
Expand description
White
or Black
.
Variants§
Implementations§
source§impl Color
impl Color
pub const fn from_char(ch: char) -> Option<Color>
pub fn char(self) -> char
pub const fn from_white(white: bool) -> Color
pub const fn from_black(black: bool) -> Color
pub fn fold_wb<T>(self, white: T, black: T) -> T
pub const fn is_white(self) -> bool
pub const fn is_black(self) -> bool
pub const fn backrank(self) -> Rank
pub fn relative_rank(self, rank: Rank) -> Rank
pub const fn pawn(self) -> Piece
pub const fn knight(self) -> Piece
pub const fn bishop(self) -> Piece
pub const fn rook(self) -> Piece
pub const fn queen(self) -> Piece
pub const fn king(self) -> Piece
Trait Implementations§
source§impl BitXorAssign<bool> for Color
impl BitXorAssign<bool> for Color
source§fn bitxor_assign(&mut self, flip: bool)
fn bitxor_assign(&mut self, flip: bool)
Performs the
^=
operation. Read moresource§impl PartialEq for Color
impl PartialEq for Color
impl Copy for Color
impl Eq for Color
impl IsEnabled for Color
Available on crate feature
nohash-hasher
only.impl StructuralPartialEq for Color
Auto Trait Implementations§
impl Freeze for Color
impl RefUnwindSafe for Color
impl Send for Color
impl Sync for Color
impl Unpin for Color
impl UnwindSafe for Color
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