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