pub enum PlayerColor {
Black,
White,
}Expand description
Defines the two player colors of a chess game Black and White.
Variants§
Implementations§
Source§impl PlayerColor
impl PlayerColor
Sourcepub fn reverse(&self) -> PlayerColor
pub fn reverse(&self) -> PlayerColor
Returns the player color not currently represented by self.
returns- The reversed player color
Trait Implementations§
Source§impl Clone for PlayerColor
impl Clone for PlayerColor
Source§fn clone(&self) -> PlayerColor
fn clone(&self) -> PlayerColor
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PlayerColor
impl Debug for PlayerColor
Source§impl PartialEq for PlayerColor
impl PartialEq for PlayerColor
impl Copy for PlayerColor
impl Eq for PlayerColor
impl StructuralPartialEq for PlayerColor
Auto Trait Implementations§
impl Freeze for PlayerColor
impl RefUnwindSafe for PlayerColor
impl Send for PlayerColor
impl Sync for PlayerColor
impl Unpin for PlayerColor
impl UnwindSafe for PlayerColor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more