pub enum PositionParsingError {
InvalidBoardStringLength {
actual: usize,
expected: usize,
},
InvalidCharacter {
character: char,
index: usize,
},
InvalidColumn {
column: usize,
index: usize,
},
InvalidFullColumnMove {
column: usize,
index: usize,
},
InvalidWinningMove {
column: usize,
index: usize,
},
}
Expand description
An enum for errors that can occur when parsing Connect Four positions.
Variants§
InvalidBoardStringLength
The board string has an invalid number of characters.
InvalidCharacter
The move sequence contains an invalid (non-numeric) character.
InvalidColumn
The move sequence contains an invalid, out of range column.
InvalidFullColumnMove
The move sequence contains an invalid move as a result of a full column.
InvalidWinningMove
The move sequence contains an invalid move that results in a winning position.
Trait Implementations§
Source§impl Clone for PositionParsingError
impl Clone for PositionParsingError
Source§fn clone(&self) -> PositionParsingError
fn clone(&self) -> PositionParsingError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PositionParsingError
impl Debug for PositionParsingError
Source§impl Display for PositionParsingError
impl Display for PositionParsingError
Source§impl Error for PositionParsingError
impl Error for PositionParsingError
1.30.0 · 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 PartialEq for PositionParsingError
impl PartialEq for PositionParsingError
impl Eq for PositionParsingError
impl StructuralPartialEq for PositionParsingError
Auto Trait Implementations§
impl Freeze for PositionParsingError
impl RefUnwindSafe for PositionParsingError
impl Send for PositionParsingError
impl Sync for PositionParsingError
impl Unpin for PositionParsingError
impl UnwindSafe for PositionParsingError
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more