Struct chess_move_gen::Castle [−][src]
pub struct Castle(pub usize);
Represents a castleove
Methods
impl Castle
[src]
impl Castle
pub fn new(s: usize) -> Castle
[src]
pub fn new(s: usize) -> Castle
pub fn to_usize(&self) -> usize
[src]
pub fn to_usize(&self) -> usize
pub const fn to_u8(&self) -> u8
[src]
pub const fn to_u8(&self) -> u8
pub fn pgn_string(&self) -> &'static str
[src]
pub fn pgn_string(&self) -> &'static str
Convert to PGN string eg "O-O-O" or "O-O"
pub fn iter() -> CastlesIter
[src]
pub fn iter() -> CastlesIter
Trait Implementations
impl PartialEq for Castle
[src]
impl PartialEq for Castle
fn eq(&self, other: &Castle) -> bool
[src]
fn eq(&self, other: &Castle) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Castle) -> bool
[src]
fn ne(&self, other: &Castle) -> bool
This method tests for !=
.
impl PartialOrd for Castle
[src]
impl PartialOrd for Castle
fn partial_cmp(&self, other: &Castle) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Castle) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Castle) -> bool
[src]
fn lt(&self, other: &Castle) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Castle) -> bool
[src]
fn le(&self, other: &Castle) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Castle) -> bool
[src]
fn gt(&self, other: &Castle) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Castle) -> bool
[src]
fn ge(&self, other: &Castle) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Copy for Castle
[src]
impl Copy for Castle
impl Clone for Castle
[src]
impl Clone for Castle
fn clone(&self) -> Castle
[src]
fn clone(&self) -> Castle
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)
Performs copy-assignment from source
. Read more
impl Display for Castle
[src]
impl Display for Castle
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 Castle
[src]
impl Debug for Castle