#[non_exhaustive]pub enum PrintableTargetError {
Show 23 variants
Io(Error),
Json(Error),
UnsupportedSchemaVersion(u32),
InvalidPageSize,
InvalidMargin,
EmptyPrintableArea,
InvalidPngDpi,
InvalidChessboardSize,
InvalidCharucoSize,
InvalidSquareSize,
InvalidMarkerSizeRel,
InvalidBorderBits,
InvalidCircleDiameter,
MissingMarkerBoardCellSize,
InvalidCircleCell,
DuplicateCircleCells,
NotEnoughDictionaryCodes {
needed: usize,
available: usize,
},
BoardDoesNotFit {
board_width_mm: f64,
board_height_mm: f64,
printable_width_mm: f64,
printable_height_mm: f64,
},
CharucoBoard(CharucoBoardError),
InvalidPuzzleBoardSize,
InvalidPuzzleBoardOrigin,
InvalidPuzzleBoardDotDiameter,
PuzzleBoardSpec(PuzzleBoardSpecError),
}Expand description
Error returned when validating a target specification or rendering a printable target bundle.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io(Error)
An I/O operation failed while writing one of the output files.
Json(Error)
The target document could not be serialized to or deserialized from JSON.
UnsupportedSchemaVersion(u32)
The document declares a schema_version this build does not understand.
InvalidPageSize
A custom page width or height is non-finite or not strictly positive.
InvalidMargin
The page margin is non-finite or negative.
EmptyPrintableArea
The page margins consume the entire page, leaving no printable area.
InvalidPngDpi
The requested PNG render resolution is not strictly positive.
InvalidChessboardSize
A chessboard spec requests fewer than 2 inner rows or columns.
InvalidCharucoSize
A ChArUco spec requests fewer than 2 rows or columns.
InvalidSquareSize
A square-size dimension is non-finite or not strictly positive.
InvalidMarkerSizeRel
The marker-to-square size ratio is non-finite or outside (0, 1].
InvalidBorderBits
The ArUco marker border width is not strictly positive.
InvalidCircleDiameter
The circle-to-square diameter ratio is non-finite or outside (0, 1].
MissingMarkerBoardCellSize
A marker board layout omits the millimeter cell size required to place it on a printable page.
InvalidCircleCell
A marker circle coordinate falls outside the board’s square grid.
DuplicateCircleCells
Two or more marker circles are placed in the same board cell.
NotEnoughDictionaryCodes
The chosen ArUco dictionary has fewer codes than the board needs.
Fields
BoardDoesNotFit
The board’s physical size exceeds the page’s printable area.
Fields
CharucoBoard(CharucoBoardError)
Validation of the underlying ChArUco board layout failed.
InvalidPuzzleBoardSize
A PuzzleBoard spec requests a row or column count outside the valid range.
InvalidPuzzleBoardOrigin
A PuzzleBoard’s origin plus size extends past the 501×501 master pattern.
InvalidPuzzleBoardDotDiameter
The PuzzleBoard edge-dot diameter ratio is outside (0, 1].
PuzzleBoardSpec(PuzzleBoardSpecError)
Validation of the underlying PuzzleBoard specification failed.
Trait Implementations§
Source§impl Debug for PrintableTargetError
impl Debug for PrintableTargetError
Source§impl Display for PrintableTargetError
impl Display for PrintableTargetError
Source§impl Error for PrintableTargetError
impl Error for PrintableTargetError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<CharucoBoardError> for PrintableTargetError
impl From<CharucoBoardError> for PrintableTargetError
Source§fn from(source: CharucoBoardError) -> Self
fn from(source: CharucoBoardError) -> Self
Source§impl From<EncodingError> for PrintableTargetError
impl From<EncodingError> for PrintableTargetError
Source§fn from(value: EncodingError) -> Self
fn from(value: EncodingError) -> Self
Source§impl From<Error> for PrintableTargetError
impl From<Error> for PrintableTargetError
Source§impl From<Error> for PrintableTargetError
impl From<Error> for PrintableTargetError
Source§impl From<PuzzleBoardSpecError> for PrintableTargetError
impl From<PuzzleBoardSpecError> for PrintableTargetError
Source§fn from(source: PuzzleBoardSpecError) -> Self
fn from(source: PuzzleBoardSpecError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for PrintableTargetError
impl !UnwindSafe for PrintableTargetError
impl Freeze for PrintableTargetError
impl Send for PrintableTargetError
impl Sync for PrintableTargetError
impl Unpin for PrintableTargetError
impl UnsafeUnpin for PrintableTargetError
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
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
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> ⓘ
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> ⓘ
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 moreSource§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Source§impl<T> StrictAs for T
impl<T> StrictAs for T
Source§fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
fn strict_as<Dst>(self) -> Dstwhere
T: StrictCast<Dst>,
Source§impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
impl<Src, Dst> StrictCastFrom<Src> for Dstwhere
Src: StrictCast<Dst>,
Source§fn strict_cast_from(src: Src) -> Dst
fn strict_cast_from(src: Src) -> Dst
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.