Enum shakmaty::Color
[−]
[src]
pub enum Color { Black, White, }
White
or Black
.
Variants
Black
White
Methods
impl Color
[src]
fn from_char(ch: char) -> Option<Color>
fn from_bool(white: bool) -> Color
fn fold<T>(self, white: T, black: T) -> T
fn is_white(self) -> bool
fn is_black(self) -> bool
fn char(self) -> char
const fn pawn(self) -> Piece
const fn knight(self) -> Piece
const fn bishop(self) -> Piece
const fn rook(self) -> Piece
const fn queen(self) -> Piece
const fn king(self) -> Piece
Trait Implementations
impl Copy for Color
[src]
impl Clone for Color
[src]
fn clone(&self) -> Color
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Eq for Color
[src]
impl PartialEq for Color
[src]
fn eq(&self, __arg_0: &Color) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0
This method tests for !=
.