Enum pgn_reader::Color
source · [−]pub enum Color {
Black,
White,
}Expand description
White or Black.
Variants
Black
White
Implementations
sourceimpl 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
sourceimpl FromStr for Color
impl FromStr for Color
type Err = ParseColorError
type Err = ParseColorError
The associated error which can be returned from parsing.
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