Enum backgammon_logic::moves::Submove [−][src]
pub enum Submove { Move { from: Position, to: Position, }, Enter { to: Position, }, BearOff { from: Position, }, }
Variants
Move
Fields of Move
from: Position | |
to: Position |
Enter
Fields of Enter
to: Position |
BearOff
Fields of BearOff
from: Position |
Trait Implementations
impl Debug for Submove
[src]
impl Debug for Submove
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for Submove
[src]
impl PartialEq for Submove
fn eq(&self, other: &Submove) -> bool
[src]
fn eq(&self, other: &Submove) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Submove) -> bool
[src]
fn ne(&self, other: &Submove) -> bool
This method tests for !=
.
impl FromStr for Submove
[src]
impl FromStr for Submove
Constructs a new submove from the supplied string.
TODO: Implement proper error handling with custom Error
types.
Caveats
Currently, this implementation only supports moves with a single /
. That is to say, moves
in the format 1/2*/3
will fail to be parsed.