Struct chess_move_gen::CastlingRights [−][src]
pub struct CastlingRights(pub usize);
Represents the right to castle in a particular director for a particular side
Methods
impl CastlingRights
[src]
impl CastlingRights
pub fn to_usize(&self) -> usize
[src]
pub fn to_usize(&self) -> usize
pub fn has(&self, right: CastlingRights) -> bool
[src]
pub fn has(&self, right: CastlingRights) -> bool
pub fn add(&mut self, castle: Castle, side: Side)
[src]
pub fn add(&mut self, castle: Castle, side: Side)
pub fn set(&mut self, rights: CastlingRights)
[src]
pub fn set(&mut self, rights: CastlingRights)
pub fn clear_side(&mut self, side: Side)
[src]
pub fn clear_side(&mut self, side: Side)
pub fn clear(&mut self, rights: CastlingRights)
[src]
pub fn clear(&mut self, rights: CastlingRights)
pub fn side_can(&self, side: Side) -> bool
[src]
pub fn side_can(&self, side: Side) -> bool
pub fn any(&self) -> bool
[src]
pub fn any(&self) -> bool
pub fn to_string(&self) -> String
[src]
pub fn to_string(&self) -> String
pub fn from(castle: Castle, side: Side) -> CastlingRights
[src]
pub fn from(castle: Castle, side: Side) -> CastlingRights
pub fn parse(chr: char) -> Result<CastlingRights, String>
[src]
pub fn parse(chr: char) -> Result<CastlingRights, String>
Trait Implementations
impl PartialEq for CastlingRights
[src]
impl PartialEq for CastlingRights
fn eq(&self, other: &CastlingRights) -> bool
[src]
fn eq(&self, other: &CastlingRights) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &CastlingRights) -> bool
[src]
fn ne(&self, other: &CastlingRights) -> bool
This method tests for !=
.
impl Copy for CastlingRights
[src]
impl Copy for CastlingRights
impl Clone for CastlingRights
[src]
impl Clone for CastlingRights
fn clone(&self) -> CastlingRights
[src]
fn clone(&self) -> CastlingRights
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Display for CastlingRights
[src]
impl Display for CastlingRights
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Debug for CastlingRights
[src]
impl Debug for CastlingRights
Auto Trait Implementations
impl Send for CastlingRights
impl Send for CastlingRights
impl Sync for CastlingRights
impl Sync for CastlingRights