Enum pgn_reader::San
[−]
[src]
pub enum San { Normal { role: Role, file: Option<i8>, rank: Option<i8>, capture: bool, to: Square, promotion: Option<Role>, }, Castle(CastlingSide), Put { role: Role, to: Square, }, Null, }
A move in Standard Algebraic Notation.
Variants
Normal
Fields of Normal
role: Role | |
file: Option<i8> | |
rank: Option<i8> | |
capture: bool | |
to: Square | |
promotion: Option<Role> |
Castle(CastlingSide)
Put
Fields of Put
role: Role | |
to: Square |
Null
Methods
impl San
[src]
fn from_bytes(san: &[u8]) -> Result<San, InvalidSan>
[src]
Parses a SAN. Ignores a possible check or checkmate suffix.
Errors
Returns InvalidSan
if san
is not syntactically valid.
fn to_move<P>(&self, pos: &P) -> Result<Move, SanError> where
P: Position,
[src]
P: Position,
Trait Implementations
impl Clone for San
[src]
fn clone(&self) -> San
[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 PartialEq<San> for San
[src]
fn eq(&self, __arg_0: &San) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &San) -> bool
[src]
This method tests for !=
.
impl FromStr for San
[src]
type Err = InvalidSan
The associated error which can be returned from parsing.
fn from_str(san: &str) -> Result<San, InvalidSan>
[src]
Parses a string s
to return a value of this type. Read more
impl Debug for San
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter.