Struct pgn_reader::SanPlus
source · [−]Expand description
A San
and possible check and checkmate suffixes.
Fields
san: San
suffix: Option<Suffix>
Implementations
sourceimpl 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) -> SanPlus where
P: Position,
pub fn from_move_and_play_unchecked<P>(pos: &mut P, m: &Move) -> SanPlus where
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.
pub fn from_move<P>(pos: P, m: &Move) -> SanPlus where
P: Position,
Trait Implementations
sourceimpl FromStr for SanPlus
impl FromStr for SanPlus
type Err = ParseSanError
type Err = ParseSanError
The associated error which can be returned from parsing.
impl Eq for SanPlus
impl StructuralEq for SanPlus
impl StructuralPartialEq for SanPlus
Auto Trait Implementations
impl RefUnwindSafe for SanPlus
impl Send for SanPlus
impl Sync for SanPlus
impl Unpin for SanPlus
impl UnwindSafe for SanPlus
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more