Enum minorhacks_chess::Color [−][src]
pub enum Color { White, Black, }
Represent a color.
Variants
Implementations
impl Color
[src]
impl Color
[src]pub fn to_my_backrank(&self) -> Rank
[src]
pub fn to_my_backrank(&self) -> Rank
[src]Convert a Color
to my backrank, which represents the starting rank
for my pieces.
pub fn to_their_backrank(&self) -> Rank
[src]
pub fn to_their_backrank(&self) -> Rank
[src]Convert a Color
to my opponents backrank, which represents the starting rank for the
opponents pieces.
pub fn to_second_rank(&self) -> Rank
[src]
pub fn to_second_rank(&self) -> Rank
[src]Convert a Color
to my second rank, which represents the starting rank for my pawns.
pub fn to_fourth_rank(&self) -> Rank
[src]
pub fn to_fourth_rank(&self) -> Rank
[src]Convert a Color
to my fourth rank, which represents the rank of my pawns when
moving two squares forward.
pub fn to_seventh_rank(&self) -> Rank
[src]
pub fn to_seventh_rank(&self) -> Rank
[src]Convert a Color
to my seventh rank, which represents the rank before pawn promotion.
Trait Implementations
impl PartialOrd<Color> for Color
[src]
impl PartialOrd<Color> for Color
[src]fn partial_cmp(&self, other: &Color) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Color) -> Option<Ordering>
[src]This method returns an ordering between self
and other
values if one exists. Read more
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for Color
[src]
impl Eq for Color
[src]
impl StructuralEq for Color
[src]
impl StructuralPartialEq for Color
[src]
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
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more