pub enum XOGameError {
AlreadyPlayedError {
index: u32,
},
GameEndedError,
}Expand description
Error use when trying to do invalid play
Currently only use in XO::play and XOBoard::play
Variants§
AlreadyPlayedError
Error of trying to play at position that isn’t empty (position that already been play)
GameEndedError
Error of trying to play after game ended
Trait Implementations§
Source§impl Debug for XOGameError
impl Debug for XOGameError
Source§impl Display for XOGameError
impl Display for XOGameError
Source§impl Error for XOGameError
impl Error for XOGameError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<XOGameError> for XOError
impl From<XOGameError> for XOError
Source§fn from(source: XOGameError) -> Self
fn from(source: XOGameError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for XOGameError
impl PartialEq for XOGameError
impl Eq for XOGameError
impl StructuralPartialEq for XOGameError
Auto Trait Implementations§
impl Freeze for XOGameError
impl RefUnwindSafe for XOGameError
impl Send for XOGameError
impl Sync for XOGameError
impl Unpin for XOGameError
impl UnwindSafe for XOGameError
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