[][src]Struct chess_move_gen::Square

pub struct Square(pub usize);

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]

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]

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]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> Cast<U> for T where
    U: FromCast<T>, 
[src]

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]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,