Enum pleco::core::File [−][src]
#[repr(u8)]pub enum File { A, B, C, D, E, F, G, H, }
Enum for the Files of a Chessboard.
Variants
A
B
C
D
E
F
G
H
Methods
impl File
[src]
impl File
pub const fn left_side_mask(self) -> u8
[src]
pub const fn left_side_mask(self) -> u8
Returns the bit-set of all files to the left of the current file.
pub const fn right_side_mask(self) -> u8
[src]
pub const fn right_side_mask(self) -> u8
Returns the bit-set of all files to the right of the current file.
pub fn min(self, other: File) -> File
[src]
pub fn min(self, other: File) -> File
Returns the minimum file.
Examples
use pleco::core::File; let file_a = File::A; assert_eq!(file_a.min(File::C), File::A);
pub fn max(self, other: File) -> File
[src]
pub fn max(self, other: File) -> File
Returns the maximum file.
Examples
use pleco::core::File; let file_a = File::A; assert_eq!(file_a.max(File::C), File::C);
pub fn distance(self, other: File) -> u8
[src]
pub fn distance(self, other: File) -> u8
Returns the distance to another File
.
ⓘImportant traits for BitBoardpub fn bb(self) -> BitBoard
[src]
pub fn bb(self) -> BitBoard
Returns the file BitBoard
.
Trait Implementations
impl Copy for File
[src]
impl Copy for File
impl Clone for File
[src]
impl Clone for File
fn clone(&self) -> File
[src]
fn clone(&self) -> File
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 PartialEq for File
[src]
impl PartialEq for File
fn eq(&self, other: &File) -> bool
[src]
fn eq(&self, other: &File) -> 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 Debug for File
[src]
impl Debug for File
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 Ord for File
[src]
impl Ord for File
fn cmp(&self, other: &File) -> Ordering
[src]
fn cmp(&self, other: &File) -> 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 File
[src]
impl PartialOrd for File
fn partial_cmp(&self, other: &File) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &File) -> 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 Eq for File
[src]
impl Eq for File
impl Not for File
[src]
impl Not for File