Enum shakmaty::Role [−][src]
pub enum Role { Pawn, Knight, Bishop, Rook, Queen, King, }
Piece types: Pawn
, Knight
, Bishop
, Rook
, Queen
, King
.
Variants
Pawn
Knight
Bishop
Rook
Queen
King
Methods
impl Role
[src]
impl Role
pub fn from_char(ch: char) -> Option<Role>
[src]
pub fn from_char(ch: char) -> Option<Role>
pub fn of(self, color: Color) -> Piece
[src]
pub fn of(self, color: Color) -> Piece
pub fn char(self) -> char
[src]
pub fn char(self) -> char
pub fn upper_char(self) -> char
[src]
pub fn upper_char(self) -> char
Trait Implementations
impl Copy for Role
[src]
impl Copy for Role
impl Clone for Role
[src]
impl Clone for Role
fn clone(&self) -> Role
[src]
fn clone(&self) -> Role
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 Eq for Role
[src]
impl Eq for Role
impl PartialEq for Role
[src]
impl PartialEq for Role
fn eq(&self, other: &Role) -> bool
[src]
fn eq(&self, other: &Role) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl Ord for Role
[src]
impl Ord for Role
fn cmp(&self, other: &Role) -> Ordering
[src]
fn cmp(&self, other: &Role) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl PartialOrd for Role
[src]
impl PartialOrd for Role
fn partial_cmp(&self, other: &Role) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Role) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
fn le(&self, other: &Rhs) -> 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: &Rhs) -> bool
1.0.0[src]
fn gt(&self, other: &Rhs) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
fn ge(&self, other: &Rhs) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Debug for Role
[src]
impl Debug for Role
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 From<Role> for u8
[src]
impl From<Role> for u8
impl From<Role> for i8
[src]
impl From<Role> for i8
impl From<Role> for u16
[src]
impl From<Role> for u16
impl From<Role> for i16
[src]
impl From<Role> for i16
impl From<Role> for u32
[src]
impl From<Role> for u32
impl From<Role> for i32
[src]
impl From<Role> for i32
impl From<Role> for u64
[src]
impl From<Role> for u64
impl From<Role> for i64
[src]
impl From<Role> for i64
impl From<Role> for u128
[src]
impl From<Role> for u128
impl From<Role> for i128
[src]
impl From<Role> for i128
impl From<Role> for usize
[src]
impl From<Role> for usize
impl From<Role> for isize
[src]
impl From<Role> for isize