Enum shakmaty::Color
[−]
[src]
pub enum Color { Black, White, }
White
or Black
.
Variants
Black
White
Methods
impl Color
[src]
pub fn from_char(ch: char) -> Option<Color>
[src]
pub fn from_white(white: bool) -> Color
[src]
pub fn from_black(black: bool) -> Color
[src]
pub fn fold<T>(self, white: T, black: T) -> T
[src]
pub fn is_white(self) -> bool
[src]
pub fn is_black(self) -> bool
[src]
pub fn char(self) -> char
[src]
pub fn pawn(self) -> Piece
[src]
pub fn knight(self) -> Piece
[src]
pub fn bishop(self) -> Piece
[src]
pub fn rook(self) -> Piece
[src]
pub fn queen(self) -> Piece
[src]
pub fn king(self) -> Piece
[src]
Trait Implementations
impl Copy for Color
[src]
impl Clone for Color
[src]
fn clone(&self) -> Color
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Eq for Color
[src]
impl PartialEq for Color
[src]
fn eq(&self, __arg_0: &Color) -> bool
[src]
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[src]
This method tests for !=
.
impl Debug for Color
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Not for Color
[src]
type Output = Color
The resulting type after applying the !
operator.
fn not(self) -> Color
[src]
Performs the unary !
operation.