#[non_exhaustive]pub enum DocumentError {
TesseractNotFound(String),
TesseractFailed {
status: i32,
stderr: String,
},
PdfiumNotFound(String),
PdfRasterFailed(String),
UnsupportedInput {
path: PathBuf,
reason: &'static str,
},
Io(Error),
OutputDir(PathBuf, Error),
BundleLayoutInvalid {
reason: BundleLayoutInvalidReason,
},
Pipeline(String),
Serde(Error),
NotImplemented(&'static str),
}Expand description
Crate-level error type for gaze-document.
Fail-closed by construction (Axis 1 reliability): every variant describes a specific, recoverable surface so adopters can branch on cause without matching opaque strings.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
TesseractNotFound(String)
Tesseract CLI is not on PATH. The payload is a per-OS install hint.
TesseractFailed
Tesseract returned a non-zero exit status. The payload carries the captured stderr (truncated) so adopters can surface it.
Fields
PdfiumNotFound(String)
pdfium dynamic library could not be loaded. The payload is a per-OS install hint.
PdfRasterFailed(String)
pdfium reported an error while parsing or rasterizing a PDF.
UnsupportedInput
Input file format is not supported by the current build (e.g. PDF
input without the pdf-input feature).
Io(Error)
An I/O error while reading the input or writing the bundle.
OutputDir(PathBuf, Error)
The bundle output directory could not be prepared.
BundleLayoutInvalid
The requested agent/owner bundle directory pair violates the runtime partition contract.
Fields
reason: BundleLayoutInvalidReasonMachine-readable reason for the layout rejection.
Pipeline(String)
gaze::Pipeline construction or invocation failed.
Serde(Error)
serde_json serialization of the bundle report or manifest failed.
NotImplemented(&'static str)
The requested operation is part of the public contract but has no implementation yet. Returned by reserved stubs (Renderer trait, ReadingOrder) until follow-up PRs land.
Trait Implementations§
Source§impl Debug for DocumentError
impl Debug for DocumentError
Source§impl Display for DocumentError
impl Display for DocumentError
Source§impl Error for DocumentError
impl Error for DocumentError
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<Error> for DocumentError
impl From<Error> for DocumentError
Auto Trait Implementations§
impl !RefUnwindSafe for DocumentError
impl !UnwindSafe for DocumentError
impl Freeze for DocumentError
impl Send for DocumentError
impl Sync for DocumentError
impl Unpin for DocumentError
impl UnsafeUnpin for DocumentError
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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> Pointable for T
impl<T> Pointable for T
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more