pub enum Move {
Buy {
piece: Piece,
},
Put {
to: Square,
piece: Piece,
},
Normal {
from: Square,
to: Square,
promote: bool,
},
}
Expand description
Represents a move which either is a normal move or a drop move.
Variants
Buy
Fields
piece: Piece
Put
Normal
Implementations
sourceimpl Move
impl Move
sourcepub fn from_sfen(s: &str) -> Option<Move>
pub fn from_sfen(s: &str) -> Option<Move>
Creates a new instance of Move
from SFEN formatted string.
sourcepub fn new(from: Square, to: Square, promote: bool) -> Move
pub fn new(from: Square, to: Square, promote: bool) -> Move
Creating new normal with ‘from’ and ‘to’ Square.
sourcepub fn get_buy_move(s: &str) -> Option<Move>
pub fn get_buy_move(s: &str) -> Option<Move>
Getting buy move from str.
sourcepub fn get_put_move(s: &str) -> Option<Move>
pub fn get_put_move(s: &str) -> Option<Move>
Getting put move from str.
Trait Implementations
sourceimpl PartialEq<Move> for MoveRecord
impl PartialEq<Move> for MoveRecord
impl Copy for Move
impl Eq for Move
impl StructuralEq for Move
impl StructuralPartialEq for Move
Auto Trait Implementations
impl RefUnwindSafe for Move
impl Send for Move
impl Sync for Move
impl Unpin for Move
impl UnwindSafe for Move
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more