pub enum DocumentExtractionError {
UnsupportedFormat {
language: String,
},
MismatchedMagic {
expected: DocumentFormat,
found: &'static str,
},
ResourceLimit {
limit: DocumentLimit,
observed: usize,
maximum: usize,
},
EncryptedPdf,
UnsupportedPdfInput,
Malformed {
format: DocumentFormat,
message: String,
},
InvalidDocxPackage {
message: String,
},
UnsupportedDocxInput {
message: String,
},
Work(IndexWorkFailure),
}Expand description
Typed failure at the PDF/DOCX trust boundary.
Variants§
UnsupportedFormat
The file was not admitted as one of the supported formats.
MismatchedMagic
The path/registry admission and file magic disagree.
Fields
expected: DocumentFormatFormat expected from the path or language registry.
ResourceLimit
A document exceeded one explicit bounded resource.
Fields
limit: DocumentLimitResource that exceeded its ceiling.
EncryptedPdf
An encrypted PDF was rejected because credentials are never accepted here.
UnsupportedPdfInput
PDF text semantics require a feature outside the admitted parser subset.
Malformed
A malformed or unreadable parser input was rejected.
Fields
format: DocumentFormatFormat whose parser reported the error.
InvalidDocxPackage
ZIP package structure is unsafe or not a supported DOCX package.
UnsupportedDocxInput
DOCX input requires a document or package feature outside the admitted set.
Work(IndexWorkFailure)
Shared indexing cancellation or deadline stopped extraction.
Trait Implementations§
Source§impl Debug for DocumentExtractionError
impl Debug for DocumentExtractionError
Source§impl Display for DocumentExtractionError
impl Display for DocumentExtractionError
Source§impl Error for DocumentExtractionError
impl Error for DocumentExtractionError
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()