Enum sudoku_variants::error::SudokuParseError[][src]

pub enum SudokuParseError {
    WrongNumberOfParts,
    WrongNumberOfCells,
    MalformedDimensions,
    InvalidDimensions,
    NumberFormatError,
    InvalidNumber,
}

An enumeration of the errors that may occur when parsing a Sudoku or SudokuGrid.

Variants

WrongNumberOfParts

Indicates that the code has the wrong number of parts, which are separated by semicolons. The code should have two parts: dimensions and cells (separated by ‘;’), so if the code does not contain exactly one semicolon, this error will be returned.

WrongNumberOfCells

Indicates that the number of cells (which are separated by commas) does not equal the number deduced from the dimensions.

MalformedDimensions

Indicates that the dimensions have the wrong format. They should be of the form <block_width>x<block_height>, so if the amount of ’x’s in the dimension string is not exactly one, this error will be raised.

InvalidDimensions

Indicates that the provided dimensions are invalid (i.e. at least one is zero).

NumberFormatError

Indicates that one of the numbers (dimension or cell content) could not be parsed.

InvalidNumber

Indicates that a cell is filled with an invalid number (0 or more than the grid size).

Trait Implementations

impl Debug for SudokuParseError[src]

impl Eq for SudokuParseError[src]

impl From<ParseIntError> for SudokuParseError[src]

impl PartialEq<SudokuParseError> for SudokuParseError[src]

impl StructuralEq for SudokuParseError[src]

impl StructuralPartialEq for SudokuParseError[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,