Struct cozy_chess::PieceMoves
source · pub struct PieceMoves {
pub piece: Piece,
pub from: Square,
pub to: BitBoard,
}
Expand description
A compact structure representing multiple moves for a piece on the board. Iterate it to unpack its moves.
Fields§
§piece: Piece
The Piece
that is moved.
from: Square
The square to move the piece from.
to: BitBoard
The possible destination squares.
Implementations§
Trait Implementations§
source§impl Clone for PieceMoves
impl Clone for PieceMoves
source§fn clone(&self) -> PieceMoves
fn clone(&self) -> PieceMoves
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PieceMoves
impl Debug for PieceMoves
source§impl Hash for PieceMoves
impl Hash for PieceMoves
source§impl IntoIterator for PieceMoves
impl IntoIterator for PieceMoves
source§impl PartialEq for PieceMoves
impl PartialEq for PieceMoves
source§fn eq(&self, other: &PieceMoves) -> bool
fn eq(&self, other: &PieceMoves) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for PieceMoves
impl Eq for PieceMoves
impl StructuralPartialEq for PieceMoves
Auto Trait Implementations§
impl Freeze for PieceMoves
impl RefUnwindSafe for PieceMoves
impl Send for PieceMoves
impl Sync for PieceMoves
impl Unpin for PieceMoves
impl UnwindSafe for PieceMoves
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