Struct cozy_chess::CastleRights
source · pub struct CastleRights {
pub short: Option<File>,
pub long: Option<File>,
}
Expand description
Castling rights.
Fields§
§short: Option<File>
The rook file for short castling.
long: Option<File>
The rook file for long castling.
Implementations§
source§impl CastleRights
impl CastleRights
sourcepub const EMPTY: CastleRights = _
pub const EMPTY: CastleRights = _
Empty CastleRights
.
§Examples
assert_eq!(CastleRights::EMPTY, CastleRights {
short: None,
long: None
});
Trait Implementations§
source§impl Clone for CastleRights
impl Clone for CastleRights
source§fn clone(&self) -> CastleRights
fn clone(&self) -> CastleRights
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 CastleRights
impl Debug for CastleRights
source§impl Hash for CastleRights
impl Hash for CastleRights
source§impl PartialEq for CastleRights
impl PartialEq for CastleRights
source§fn eq(&self, other: &CastleRights) -> bool
fn eq(&self, other: &CastleRights) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for CastleRights
impl Eq for CastleRights
impl StructuralPartialEq for CastleRights
Auto Trait Implementations§
impl Freeze for CastleRights
impl RefUnwindSafe for CastleRights
impl Send for CastleRights
impl Sync for CastleRights
impl Unpin for CastleRights
impl UnwindSafe for CastleRights
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