Struct chess_notation_parser::Castling 
source · [−]pub struct Castling {
    pub type: CastlingType,
    pub flags: u8,
}Expand description
Castling turn
In chess, castling is a special move where a King can move two squares either to the left (Kingside Castle) or right (Queenside Castle). The rook is then placed to the left or right of the King respectively.
Example
use chess_notation_parser::{Turn, Castling, CastlingType, Flag};
let turn = Turn::Castling(
    Castling {
        r#type: CastlingType::Short,
        flags: Flag::CHECK,
    }
);
assert_eq!(turn, Turn::try_from("0-0+").unwrap());Fields
type: CastlingTypeCastling type (side)
flags: u8Extra bits of information stored in a bitmask about the turn, check
Flag for more info
Trait Implementations
impl Copy for Castling
impl StructuralPartialEq for Castling
Auto Trait Implementations
impl RefUnwindSafe for Castling
impl Send for Castling
impl Sync for Castling
impl Unpin for Castling
impl UnwindSafe for Castling
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
    T: ?Sized, 
 
impl<T> BorrowMut<T> for T where
    T: ?Sized, 
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
 
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more