Enum backgammon_logic::moves::Submove [−][src]
pub enum Submove {
Move {
from: Position,
to: Position,
},
Enter {
to: Position,
},
BearOff {
from: Position,
},
}Variants
MoveFields of Move
from: Position | |
to: Position |
EnterFields of Enter
to: Position |
BearOffFields of BearOff
from: Position |
Trait Implementations
impl Debug for Submove[src]
impl Debug for Submovefn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl PartialEq for Submove[src]
impl PartialEq for Submovefn eq(&self, other: &Submove) -> bool[src]
fn eq(&self, other: &Submove) -> boolThis 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) -> boolThis method tests for !=.
impl FromStr for Submove[src]
impl FromStr for SubmoveConstructs 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.