pub enum Color {
Black,
White,
}
Expand description
White
or Black
.
Variants
Black
White
Implementations
sourceimpl Color
impl Color
pub fn from_char(ch: char) -> Option<Color>
pub fn from_white(white: bool) -> Color
pub fn from_black(black: bool) -> Color
pub fn fold<T>(self, white: T, black: T) -> T
pub fn is_white(self) -> bool
pub fn is_black(self) -> bool
pub fn char(self) -> char
pub fn pawn(self) -> Piece
pub fn knight(self) -> Piece
pub fn bishop(self) -> Piece
pub fn rook(self) -> Piece
pub fn queen(self) -> Piece
pub fn king(self) -> Piece
Trait Implementations
impl Copy for Color
impl Eq for Color
impl StructuralEq for Color
impl StructuralPartialEq for Color
Auto Trait Implementations
impl RefUnwindSafe for Color
impl Send for Color
impl Sync for Color
impl Unpin for Color
impl UnwindSafe for Color
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more