pub enum Error {
Show 20 variants
GameStarted,
GameEnded,
CubeAwaitReaction,
CubeReceived,
CubeNotPermitted,
CubeValueInvalid,
PlayerInvalid,
FieldBlocked,
FieldInvalid,
NotYourTurn,
MatchEnded,
MoveInvalid,
MoveInvalidBar,
MoveInvalidOff,
MoveFirst,
RollFirst,
RuleInvalid,
DiceInvalid,
DiceConsumed,
PointsInvalid,
}Expand description
Stores all possible Backgammon game error types.
Variants§
GameStarted
The game has already started.
GameEnded
The game has already ended.
CubeAwaitReaction
The cube has been offered, await acceptance or rejection.
CubeReceived
The opponent has offered the doubling cube. You need to decide whether to accept or decline.
CubeNotPermitted
Doubling is not permitted.
CubeValueInvalid
Invalid cube value.
PlayerInvalid
Invalid player.
FieldBlocked
Field blocked.
FieldInvalid
Invalid field.
NotYourTurn
Not your turn.
MatchEnded
Match ended.
MoveInvalid
Invalid move.
MoveInvalidBar
Invalid move, checker on the bar.
MoveInvalidOff
Invalid move, not all checkers are in the home field.
MoveFirst
Move first.
RollFirst
Roll first.
RuleInvalid
Invalid rule, for example, when asking for a Murphy limit if the Murphy rule is not set.
DiceInvalid
Dice invalid, for example, when rolling a dice with a value outside the range [1, 6].
DiceConsumed
Dice Consumed.
PointsInvalid
Invalid points.
Trait Implementations§
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe for Error
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more