Struct shakmaty::Pocket [−][src]
pub struct Pocket { pub pawns: u8, pub knights: u8, pub bishops: u8, pub rooks: u8, pub queens: u8, pub kings: u8, }
A players Crazyhouse pocket.
Fields
pawns: u8
knights: u8
bishops: u8
rooks: u8
queens: u8
kings: u8
Methods
impl Pocket
[src]
impl Pocket
pub fn by_role(&self, role: Role) -> u8
[src]
pub fn by_role(&self, role: Role) -> u8
pub fn by_role_mut(&mut self, role: Role) -> &mut u8
[src]
pub fn by_role_mut(&mut self, role: Role) -> &mut u8
pub fn count(&self) -> usize
[src]
pub fn count(&self) -> usize
Trait Implementations
impl Clone for Pocket
[src]
impl Clone for Pocket
fn clone(&self) -> Pocket
[src]
fn clone(&self) -> Pocket
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 Eq for Pocket
[src]
impl Eq for Pocket
impl PartialEq for Pocket
[src]
impl PartialEq for Pocket
fn eq(&self, other: &Pocket) -> bool
[src]
fn eq(&self, other: &Pocket) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Pocket) -> bool
[src]
fn ne(&self, other: &Pocket) -> bool
This method tests for !=
.
impl Debug for Pocket
[src]
impl Debug for Pocket
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 Default for Pocket
[src]
impl Default for Pocket