Struct pgn4::BasicMove [−][src]
pub struct BasicMove { pub piece: char, pub from: Position, pub captured: Option<char>, pub to: Position, pub promotion: Option<char>, pub checks: usize, pub mates: usize, }
Expand description
The most common type of move that contains to and from positions
The mapping from Struct to String is mostly straightforward. The struct elements are in the order they are serialized in.
If the piece moved is a pawn, piece
= ‘P’. Similarly, is a pawn is captured, captured
= Some(‘P’).
Fields
piece: char
from: Position
captured: Option<char>
to: Position
promotion: Option<char>
checks: usize
mates: usize
Trait Implementations
impl Eq for BasicMove
[src]
impl StructuralEq for BasicMove
[src]
impl StructuralPartialEq for BasicMove
[src]
Auto Trait Implementations
impl RefUnwindSafe for BasicMove
impl Send for BasicMove
impl Sync for BasicMove
impl Unpin for BasicMove
impl UnwindSafe for BasicMove
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more