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()
Auto Trait Implementations§
impl Freeze for DocumentExtractionError
impl RefUnwindSafe for DocumentExtractionError
impl Send for DocumentExtractionError
impl Sync for DocumentExtractionError
impl Unpin for DocumentExtractionError
impl UnsafeUnpin for DocumentExtractionError
impl UnwindSafe for DocumentExtractionError
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
§impl<'a, T> FromIn<'a, T> for T
impl<'a, T> FromIn<'a, T> for T
§impl<'a, T, U> IntoIn<'a, U> for Twhere
U: FromIn<'a, T>,
impl<'a, T, U> IntoIn<'a, U> for Twhere
U: FromIn<'a, T>,
§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string()] Read more§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString]. Read more