Enum pgn_reader::CastlingSide
source · [−]pub enum CastlingSide {
KingSide,
QueenSide,
}
Expand description
KingSide
(O-O) or QueenSide
(O-O-O).
Variants
KingSide
QueenSide
Implementations
sourceimpl CastlingSide
impl CastlingSide
pub fn is_queen_side(self) -> bool
pub fn is_king_side(self) -> bool
pub fn from_queen_side(queen_side: bool) -> CastlingSide
pub fn from_king_side(king_side: bool) -> CastlingSide
pub fn king_to_file(self) -> File
pub fn rook_to_file(self) -> File
pub fn king_to(self, color: Color) -> Square
pub fn rook_to(self, color: Color) -> Square
sourcepub const ALL: [CastlingSide; 2]
pub const ALL: [CastlingSide; 2]
KingSide
and QueenSide
, in this order.
Trait Implementations
sourceimpl Clone for CastlingSide
impl Clone for CastlingSide
sourcepub fn clone(&self) -> CastlingSide
pub fn clone(&self) -> CastlingSide
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for CastlingSide
impl Debug for CastlingSide
sourceimpl Hash for CastlingSide
impl Hash for CastlingSide
sourceimpl PartialEq<CastlingSide> for CastlingSide
impl PartialEq<CastlingSide> for CastlingSide
impl Copy for CastlingSide
impl Eq for CastlingSide
impl StructuralEq for CastlingSide
impl StructuralPartialEq for CastlingSide
Auto Trait Implementations
impl RefUnwindSafe for CastlingSide
impl Send for CastlingSide
impl Sync for CastlingSide
impl Unpin for CastlingSide
impl UnwindSafe for CastlingSide
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