pub struct Move<'l> { /* private fields */ }Expand description
A legal move.
Implementations§
Source§impl<'l> Move<'l>
impl<'l> Move<'l>
Sourcepub fn make(self) -> Position
pub fn make(self) -> Position
Returns the position after playing the move.
This sets the en passant square after a double pawn advance, even when there is no pawn to capture or when capturing is not legal.
Sourcepub fn promotion(self) -> Option<Role>
pub fn promotion(self) -> Option<Role>
Returns the type of piece that the pawn is promoted to, if the move is a promotion.
Sourcepub fn is_capture(self) -> bool
pub fn is_capture(self) -> bool
Returns true if the move is a capture.
Trait Implementations§
Auto Trait Implementations§
impl<'l> Freeze for Move<'l>
impl<'l> RefUnwindSafe for Move<'l>
impl<'l> Send for Move<'l>
impl<'l> Sync for Move<'l>
impl<'l> Unpin for Move<'l>
impl<'l> UnwindSafe for Move<'l>
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