Enum pgn_reader::Color
source · [−]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 char(self) -> char
pub fn from_white(white: bool) -> Color
pub fn from_black(black: bool) -> Color
pub fn fold_wb<T>(self, white: T, black: T) -> T
pub fn is_white(self) -> bool
pub fn is_black(self) -> bool
pub fn backrank(self) -> Rank
pub fn relative_rank(self, rank: Rank) -> Rank
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
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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more