pub enum Color {
Black = 0,
White = 1,
}Variants§
Implementations§
Source§impl Color
impl Color
pub const unsafe fn from_int(int: u8) -> Self
pub const unsafe fn from_index(index: usize) -> Self
pub const fn to_int(self) -> u8
pub const fn to_index(self) -> usize
pub fn to_my_backrank(self) -> Rank
pub fn to_their_backrank(self) -> Rank
pub fn to_my_backrank_bitboard(self) -> BitBoard ⓘ
pub fn to_their_backrank_bitboard(self) -> BitBoard ⓘ
pub fn to_first_rank(self) -> Rank
pub fn to_first_rank_bitboard(self) -> BitBoard ⓘ
pub fn to_second_rank(self) -> Rank
pub fn to_second_rank_bitboard(self) -> BitBoard ⓘ
pub fn to_third_rank(self) -> Rank
pub fn to_third_rank_bitboard(self) -> BitBoard ⓘ
pub fn to_fourth_rank(self) -> Rank
pub fn to_fourth_rank_bitboard(self) -> BitBoard ⓘ
pub fn to_fifth_rank(self) -> Rank
pub fn to_fifth_rank_bitboard(self) -> BitBoard ⓘ
pub fn to_sixth_rank(self) -> Rank
pub fn to_sixth_rank_bitboard(self) -> BitBoard ⓘ
pub fn to_seventh_rank(self) -> Rank
pub fn to_seventh_rank_bitboard(self) -> BitBoard ⓘ
pub fn to_eighth_rank(self) -> Rank
pub fn to_eighth_rank_bitboard(self) -> BitBoard ⓘ
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Color
impl<'de> Deserialize<'de> for Color
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<'source> FromPyObject<'source> for Color
Available on crate feature pyo3 only.
impl<'source> FromPyObject<'source> for Color
Available on crate feature
pyo3 only.Source§impl Ord for Color
impl Ord for Color
Source§impl PartialOrd for Color
impl PartialOrd for Color
impl Copy for Color
impl Eq for Color
impl StructuralPartialEq for Color
Auto Trait Implementations§
impl Freeze for Color
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 Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<T> CustomColorize for Twhere
T: ToString,
impl<T> CustomColorize for Twhere
T: ToString,
fn colorize( &self, style_functions: &[fn(ColoredString) -> ColoredString], ) -> String
Source§impl<'py, T> FromPyObjectBound<'_, 'py> for Twhere
T: FromPyObject<'py>,
impl<'py, T> FromPyObjectBound<'_, 'py> for Twhere
T: FromPyObject<'py>,
Source§impl<T> FromQuery for Twhere
T: DeserializeOwned,
impl<T> FromQuery for Twhere
T: DeserializeOwned,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more