[−][src]Struct chess_move_gen::Square
Represents a square on the chessboard
Implementations
impl Square
[src]
pub fn new(s: usize) -> Square
[src]
pub const fn to_u8(&self) -> u8
[src]
pub fn to_i32(&self) -> i32
[src]
pub fn to_u32(&self) -> u32
[src]
pub fn raw(&self) -> usize
[src]
pub fn same_file(&self, other: Square) -> bool
[src]
pub fn diagonal(&self) -> usize
[src]
pub fn anti_diagonal(&self) -> usize
[src]
pub fn inc(&mut self)
[src]
pub fn to_usize(&self) -> usize
[src]
pub fn from_side(&self, side: Side) -> Square
[src]
pub fn flip(&self) -> Square
[src]
pub fn rotate_right(&self, amount: usize) -> Square
[src]
pub fn rotate_left(&self, amount: usize) -> Square
[src]
pub fn to_str(&self) -> &'static str
[src]
pub fn to_string(&self) -> String
[src]
pub fn along_row_with_col(&self, other: Square) -> Square
[src]
pub fn change_row(&self, row: usize) -> Square
[src]
pub fn row(&self) -> usize
[src]
pub fn rowx8(&self) -> usize
[src]
pub fn col(&self) -> usize
[src]
pub fn from(row: usize, col: usize) -> Square
[src]
pub fn parse(s: &str) -> Result<Option<Square>, String>
[src]
pub fn iter() -> SquaresIterⓘNotable traits for SquaresIter
impl Iterator for SquaresIter type Item = Square;
[src]
Notable traits for SquaresIter
impl Iterator for SquaresIter type Item = Square;
Trait Implementations
impl Clone for Square
[src]
impl Copy for Square
[src]
impl Debug for Square
[src]
impl Display for Square
[src]
impl PartialEq<Square> for Square
[src]
impl PartialOrd<Square> for Square
[src]
pub fn partial_cmp(&self, other: &Square) -> Option<Ordering>
[src]
pub fn lt(&self, other: &Square) -> bool
[src]
pub fn le(&self, other: &Square) -> bool
[src]
pub fn gt(&self, other: &Square) -> bool
[src]
pub fn ge(&self, other: &Square) -> bool
[src]
impl StructuralPartialEq for Square
[src]
Auto Trait Implementations
impl RefUnwindSafe for Square
impl Send for Square
impl Sync for Square
impl Unpin for Square
impl UnwindSafe for Square
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> Cast<U> for T where
U: FromCast<T>,
[src]
U: FromCast<T>,
impl<T> From<T> for T
[src]
impl<T> FromCast<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,