[][src]Enum shogi::position::MoveRecord

pub enum MoveRecord {
    Normal {
        from: Square,
        to: Square,
        moved: Piece,
        captured: Option<Piece>,
        promoted: bool,
    },
    Drop {
        to: Square,
        piece: Piece,
    },
}

MoveRecord stores information necessary to undo the move.

Variants

Normal

Fields of Normal

from: Squareto: Squaremoved: Piececaptured: Option<Piece>promoted: bool
Drop

Fields of Drop

to: Squarepiece: Piece

Methods

impl MoveRecord
[src]

pub fn to_sfen(&self) -> String
[src]

Converts the move into SFEN formatted string.

Trait Implementations

impl PartialEq<Move> for MoveRecord
[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl Debug for MoveRecord
[src]

Auto Trait Implementations

impl Send for MoveRecord

impl Sync for MoveRecord

Blanket Implementations

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

impl<T> From for T
[src]

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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