#[non_exhaustive]pub enum SquareColor {
Light,
Dark,
}Expand description
Colour of a square — the default binary partition used by chess
(and the default type parameter C for Constraint /
crate::Problem).
For N-way colour partitions, define your own enum and use it as
the C type parameter. Any Copy + Eq + Hash + Debug type
satisfies ColorKind.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Trait Implementations§
Source§impl Clone for SquareColor
impl Clone for SquareColor
Source§fn clone(&self) -> SquareColor
fn clone(&self) -> SquareColor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 SquareColor
impl Debug for SquareColor
Source§impl<'de> Deserialize<'de> for SquareColor
impl<'de> Deserialize<'de> for SquareColor
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for SquareColor
impl Hash for SquareColor
Source§impl PartialEq for SquareColor
impl PartialEq for SquareColor
Source§fn eq(&self, other: &SquareColor) -> bool
fn eq(&self, other: &SquareColor) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SquareColor
impl Serialize for SquareColor
impl Copy for SquareColor
impl Eq for SquareColor
impl StructuralPartialEq for SquareColor
Auto Trait Implementations§
impl Freeze for SquareColor
impl RefUnwindSafe for SquareColor
impl Send for SquareColor
impl Sync for SquareColor
impl Unpin for SquareColor
impl UnsafeUnpin for SquareColor
impl UnwindSafe for SquareColor
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