[−][src]Enum vampirc_uci::uci::UciPiece
An enum representing the chess piece types.
Variants
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]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<UciPiece> for UciPiece
[src]
impl StructuralEq for UciPiece
[src]
impl StructuralPartialEq for UciPiece
[src]
Auto Trait Implementations
impl RefUnwindSafe for UciPiece
impl Send for UciPiece
impl Sync for UciPiece
impl Unpin for UciPiece
impl UnwindSafe for UciPiece
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,