Enum hexe_core::color::Color
[−]
[src]
#[repr(u8)]pub enum Color { White, Black, }
A black or white color.
Variants
White
White color.
Black
Black color.
Methods
impl Color
[src]
pub fn from_char(ch: char) -> Option<Color>
[src]
Returns a color from the parsed character.
pub fn into_str(self) -> &'static str
[src]
Converts self
into a static string.
Trait Implementations
impl From<Color> for Bitboard
[src]
impl Index<Color> for MultiBoard
[src]
type Output = Bitboard
The returned type after indexing.
ⓘImportant traits for Bitboardfn index(&self, color: Color) -> &Bitboard
[src]
Performs the indexing (container[index]
) operation.
impl IndexMut<Color> for MultiBoard
[src]
ⓘImportant traits for Bitboardfn index_mut(&mut self, color: Color) -> &mut Bitboard
[src]
Performs the mutable indexing (container[index]
) operation.
impl Index for Color
[src]
ⓘImportant traits for Bitboardfn bitboard(self, board: &MultiBoard) -> Bitboard
[src]
Returns the bitboard for self
in board
.
fn remove<T: Into<Bitboard>>(self, bits: T, board: &mut MultiBoard)
[src]
Removes the bits
of self
from board
.
fn remove_unchecked<T: Into<Bitboard>>(self, bits: T, board: &mut MultiBoard)
[src]
Performs a blind removal of self
at bits
in board
.
impl From<Color> for Rights
[src]
impl Copy for Color
[src]
impl Clone for Color
[src]
fn clone(&self) -> Color
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Hash for Color
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl PartialEq for Color
[src]
fn eq(&self, __arg_0: &Color) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl Eq for Color
[src]
impl PartialOrd for Color
[src]
fn partial_cmp(&self, __arg_0: &Color) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
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
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
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for Color
[src]
fn cmp(&self, __arg_0: &Color) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
impl FromUnchecked<u8> for Color
[src]
unsafe fn from_unchecked(inner: u8) -> Self
[src]
Performs the unchecked conversion.
impl From<u8> for Color
[src]
impl FromUnchecked<u16> for Color
[src]
unsafe fn from_unchecked(inner: u16) -> Self
[src]
Performs the unchecked conversion.
impl From<u16> for Color
[src]
impl FromUnchecked<u32> for Color
[src]
unsafe fn from_unchecked(inner: u32) -> Self
[src]
Performs the unchecked conversion.
impl From<u32> for Color
[src]
impl FromUnchecked<u64> for Color
[src]
unsafe fn from_unchecked(inner: u64) -> Self
[src]
Performs the unchecked conversion.
impl From<u64> for Color
[src]
impl FromUnchecked<usize> for Color
[src]
unsafe fn from_unchecked(inner: usize) -> Self
[src]
Performs the unchecked conversion.
impl From<usize> for Color
[src]
impl Debug for Color
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Display for Color
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl FromStr for Color
[src]
type Err = FromStrError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Color, FromStrError>
[src]
Parses a string s
to return a value of this type. Read more
impl Not for Color
[src]
type Output = Color
The resulting type after applying the !
operator.
fn not(self) -> Color
[src]
Performs the unary !
operation.