Enum hexe_core::piece::PieceKind
[−]
[src]
#[repr(u8)]pub enum PieceKind { Pawn, Knight, Bishop, Rook, Queen, King, }
A chess piece kind.
Variants
Pawn
Knight
Bishop
Rook
Queen
King
Methods
impl PieceKind
[src]
pub fn from_char(ch: char) -> Option<PieceKind>
[src]
Returns a piece kind from the parsed character.
pub fn into_str(self) -> &'static str
[src]
Converts self
into a static string.
pub fn into_char(self) -> char
[src]
Converts self
into a character.
pub fn is_promotion(&self) -> bool
[src]
The kind is a promotion.
Trait Implementations
impl Copy for PieceKind
[src]
impl Clone for PieceKind
[src]
fn clone(&self) -> PieceKind
[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 PieceKind
[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 PieceKind
[src]
fn eq(&self, __arg_0: &PieceKind) -> 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 PieceKind
[src]
impl FromUnchecked<u8> for PieceKind
[src]
unsafe fn from_unchecked(inner: u8) -> Self
[src]
Performs the unchecked conversion.
impl From<u8> for PieceKind
[src]
impl FromUnchecked<u16> for PieceKind
[src]
unsafe fn from_unchecked(inner: u16) -> Self
[src]
Performs the unchecked conversion.
impl From<u16> for PieceKind
[src]
impl FromUnchecked<u32> for PieceKind
[src]
unsafe fn from_unchecked(inner: u32) -> Self
[src]
Performs the unchecked conversion.
impl From<u32> for PieceKind
[src]
impl FromUnchecked<u64> for PieceKind
[src]
unsafe fn from_unchecked(inner: u64) -> Self
[src]
Performs the unchecked conversion.
impl From<u64> for PieceKind
[src]
impl FromUnchecked<usize> for PieceKind
[src]
unsafe fn from_unchecked(inner: usize) -> Self
[src]
Performs the unchecked conversion.
impl From<usize> for PieceKind
[src]
impl Debug for PieceKind
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Display for PieceKind
[src]
fn fmt(&self, f: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl From<PieceKind> for char
[src]
impl From<Promotion> for PieceKind
[src]
impl FromStr for PieceKind
[src]
type Err = FromStrError
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<PieceKind, FromStrError>
[src]
Parses a string s
to return a value of this type. Read more
impl FromUnchecked<PieceKind> for Promotion
[src]
unsafe fn from_unchecked(pk: PieceKind) -> Promotion
[src]
Performs the unchecked conversion.