pub enum Error {
InvalidGridSize(usize),
DisconnectedPolyomino,
MissingCell(Cell),
MissingPolyomino(Polyomino),
CageConflict(Polyomino),
InfeasibleCage(Polyomino, u64),
InvalidCageFill(Polyomino, Fill),
EmptyFills,
InvalidCellCageIndex(usize),
InvalidCellValue(Cell, N),
InvalidValue(N),
}Expand description
Errors returned by mathdoku operations.
Variants§
InvalidGridSize(usize)
Invalid grid size.
DisconnectedPolyomino
The cells do not form a connected polyomino.
MissingCell(Cell)
The Cell is missing from the specified polyomino or grid.
MissingPolyomino(Polyomino)
The Polyomino contains cells not present in the puzzle grid.
CageConflict(Polyomino)
Two polyominoes share one or more cells.
InfeasibleCage(Polyomino, u64)
No valid value assignment exists for the cage (operator/target infeasible).
InvalidCageFill(Polyomino, Fill)
Invalid fill for a cage.
EmptyFills
No candidate fills for a cage (internal solver state).
InvalidCellCageIndex(usize)
The index for a Cell in a cage is out of bounds.
InvalidCellValue(Cell, N)
Value not permitted in this Cell.
InvalidValue(N)
A value passed to Fill::new is outside the valid range 1..=9.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()
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