Struct pgn_reader::SanPlus
source · Expand description
A San
and possible check and checkmate suffixes.
Fields§
§san: San
§suffix: Option<Suffix>
Implementations§
source§impl SanPlus
impl SanPlus
sourcepub fn from_ascii(san: &[u8]) -> Result<SanPlus, ParseSanError>
pub fn from_ascii(san: &[u8]) -> Result<SanPlus, ParseSanError>
Parses a SAN and possible check and checkmate suffix.
Errors
Returns ParseSanError
if san
is not syntactically valid.
sourcepub fn from_move_and_play_unchecked<P>(pos: &mut P, m: &Move) -> SanPluswhere
P: Position,
pub fn from_move_and_play_unchecked<P>(pos: &mut P, m: &Move) -> SanPluswhere
P: Position,
Converts a move to Standard Algebraic Notation including possible check and checkmate suffixes. Also plays the move.
It is the callers responsibility to ensure the move is legal.
Panics
Illegal moves can corrupt the state of the position and may (or may not) panic or cause panics on future calls.