pub struct Square(pub SquareInternal);Expand description
Represents a square on the chessboard
Tuple Fields§
§0: SquareInternalImplementations§
Source§impl Square
impl Square
pub fn new(s: SquareInternal) -> Square
pub const fn to_u8(self) -> u8
pub fn to_i32(self) -> i32
pub fn to_i16(self) -> i16
pub fn to_u32(self) -> u32
pub fn raw(self) -> SquareInternal
pub fn file_mask(self) -> BB
pub fn same_file(self, other: Square) -> bool
pub fn file_char(self) -> char
pub fn rank_char(self) -> char
pub fn diagonals(self) -> BB
pub fn anti_diagonals(self) -> BB
pub fn bishop_rays(self) -> BB
pub fn rook_rays(self) -> BB
pub fn king_moves(self) -> BB
pub fn knight_moves(self) -> BB
pub fn inc(&mut self)
pub fn to_usize(self) -> usize
pub fn from_side(self, side: Side) -> Square
pub fn flip(self) -> Square
pub fn rotate_right(self, amount: SquareInternal) -> Square
pub fn rotate_left(self, amount: SquareInternal) -> Square
pub fn along_row_with_col(self, other: Square) -> Square
pub fn change_row(self, row: SquareInternal) -> Square
pub fn row(self) -> SquareInternal
pub fn rowx8(self) -> SquareInternal
pub fn col(self) -> SquareInternal
pub fn from(row: SquareInternal, col: SquareInternal) -> Square
pub fn parse(s: &str) -> Result<Option<Square>, String>
pub fn iter() -> SquaresIter ⓘ
Trait Implementations§
Source§impl PartialOrd for Square
impl PartialOrd for Square
impl Copy 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 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