pub struct Square(/* private fields */);Implementations§
Source§impl Square
impl Square
pub fn new(column: char, row: usize) -> Self
pub fn from_index(index: u8) -> Self
pub fn from_bit_board(board: u64) -> Self
pub fn from_multiple_bits(board: u64) -> Vec<Self>
pub fn as_bit_board(&self) -> u64
pub fn get_index(&self) -> usize
pub fn invert(&self) -> Self
pub fn vertical_symmetry(&self) -> Self
pub fn column_char(&self) -> char
pub fn row(&self) -> u8
pub fn shift_in_direction(&self, direction: Direction) -> Self
pub fn can_shift_in_direction(&self, direction: Direction) -> bool
pub fn is_adjacent(&self, square: &Self) -> bool
Trait Implementations§
impl Copy for Square
impl Eq for Square
Source§impl Ord for Square
impl Ord for Square
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Square
impl PartialOrd for Square
impl StructuralPartialEq for Square
Auto Trait Implementations§
impl Freeze for Square
impl RefUnwindSafe for Square
impl Send for Square
impl Sync for Square
impl Unpin for Square
impl UnsafeUnpin for Square
impl UnwindSafe for Square
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more