pub enum PdfError {
Pdfium(String),
Document(String),
Layout(String),
Ocr(String),
Timeout(String),
Encrypted(EncryptionError),
}Expand description
Errors from the PDF backend. Detailed and surfaced (never silently skipped).
Variants§
Pdfium(String)
pdfium failed to bind, open, or read the document (and, historically, any pipeline error outside the models).
Document(String)
The document itself: an object model lopdf cannot read, a page no renderer can draw, a page range outside it.
Layout(String)
The layout ONNX model failed to load or run.
Ocr(String)
The OCR ONNX model failed to load or run.
Timeout(String)
The document budget (Pipeline::document_timeout) ran out between
two pages. Internally the sentinel that stops the page walk; a caller
never sees it from Pipeline::convert — the conversion returns the
pages it finished and reports the cut through Completion.
Encrypted(EncryptionError)
The document is encrypted and the password given (or none) does not
open it (#636) — the typed value a caller prompts for a password on,
reachable through std::error::Error::source too. Its text is the
one docling raises.
Trait Implementations§
Source§impl Error for PdfError
impl Error for PdfError
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 PdfError
impl RefUnwindSafe for PdfError
impl Send for PdfError
impl Sync for PdfError
impl Unpin for PdfError
impl UnsafeUnpin for PdfError
impl UnwindSafe for PdfError
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 more