Enum pgn_reader::CastlingSide
source · pub enum CastlingSide {
KingSide,
QueenSide,
}
Expand description
KingSide
(O-O) or QueenSide
(O-O-O).
Variants§
Implementations§
source§impl CastlingSide
impl CastlingSide
pub const fn is_queen_side(self) -> bool
pub const fn is_king_side(self) -> bool
pub const fn from_queen_side(queen_side: bool) -> CastlingSide
pub const fn from_king_side(king_side: bool) -> CastlingSide
pub const fn king_to_file(self) -> File
pub const fn rook_to_file(self) -> File
pub fn king_to(self, color: Color) -> Square
pub fn rook_to(self, color: Color) -> Square
pub const fn other(self) -> CastlingSide
sourcepub const ALL: [CastlingSide; 2] = _
pub const ALL: [CastlingSide; 2] = _
KingSide
and QueenSide
, in this order.
Trait Implementations§
source§impl BitXor<bool> for CastlingSide
impl BitXor<bool> for CastlingSide
§type Output = CastlingSide
type Output = CastlingSide
The resulting type after applying the
^
operator.source§impl BitXorAssign<bool> for CastlingSide
impl BitXorAssign<bool> for CastlingSide
source§fn bitxor_assign(&mut self, flip: bool)
fn bitxor_assign(&mut self, flip: bool)
Performs the
^=
operation. Read moresource§impl Clone for CastlingSide
impl Clone for CastlingSide
source§fn clone(&self) -> CastlingSide
fn clone(&self) -> CastlingSide
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CastlingSide
impl Debug for CastlingSide
source§impl Hash for CastlingSide
impl Hash for CastlingSide
source§impl Not for CastlingSide
impl Not for CastlingSide
§type Output = CastlingSide
type Output = CastlingSide
The resulting type after applying the
!
operator.source§fn not(self) -> CastlingSide
fn not(self) -> CastlingSide
Performs the unary
!
operation. Read moresource§impl PartialEq for CastlingSide
impl PartialEq for CastlingSide
source§fn eq(&self, other: &CastlingSide) -> bool
fn eq(&self, other: &CastlingSide) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for CastlingSide
impl Eq for CastlingSide
impl StructuralPartialEq for CastlingSide
Auto Trait Implementations§
impl Freeze for CastlingSide
impl RefUnwindSafe for CastlingSide
impl Send for CastlingSide
impl Sync for CastlingSide
impl Unpin for CastlingSide
impl UnwindSafe for CastlingSide
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more