[][src]Enum vampirc_uci::uci::UciPiece

pub enum UciPiece {
    Pawn,
    Knight,
    Bishop,
    Rook,
    Queen,
    King,
}

An enum representing the chess piece types.

Variants

Pawn
Knight
Bishop
Rook
Queen
King

Implementations

impl UciPiece[src]

pub fn as_char(self) -> Option<char>[src]

Returns a character representing a piece in UCI move notation. Used for specifying promotion in moves.

n – knight b - bishop r - rook q - queen k - king None - pawn

Trait Implementations

impl Clone for UciPiece[src]

impl Copy for UciPiece[src]

impl Debug for UciPiece[src]

impl Eq for UciPiece[src]

impl FromStr for UciPiece[src]

type Err = FmtError

The associated error which can be returned from parsing.

fn from_str(s: &str) -> Result<UciPiece, FmtError>[src]

Creates a UciPiece from a &str, according to these rules:

"n" - Knight "p" - Pawn "b" - Bishop "r" - Rook "k" - King "q" - Queen

Works with uppercase letters as well.

impl Hash for UciPiece[src]

impl PartialEq<UciPiece> for UciPiece[src]

impl StructuralEq for UciPiece[src]

impl StructuralPartialEq for UciPiece[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.