pub enum Error {
Show 14 variants
Io(Error),
Syntax {
offset: usize,
msg: String,
},
InvalidXref,
ObjectNotFound(u32, u16),
MissingKey(&'static str),
TypeMismatch {
expected: &'static str,
found: &'static str,
},
UnsupportedFilter(String),
Decode(String),
Encrypted,
PageNotFound(usize, usize),
CircularReference(u32),
Transport(String),
RandomUnavailable(String),
Other(String),
}Expand description
All errors surfaced by pdfboss.
Parsing is lenient by design; hard errors are reserved for unreadable cross-reference data (after recovery), encryption, and I/O.
Variants§
Io(Error)
Syntax
InvalidXref
ObjectNotFound(u32, u16)
MissingKey(&'static str)
TypeMismatch
UnsupportedFilter(String)
Decode(String)
Encrypted
PageNotFound(usize, usize)
CircularReference(u32)
Transport(String)
A transport-layer failure from an asynchronous byte source — an I/O error, an HTTP failure, a refused range request, a short read.
Carried as a rendered message so this crate stays free of transport
types. Produced when a source whose own error type is richer (the
asynchronous document’s) crosses a shared-algorithm boundary that
speaks this Result; the adapter unwraps its parse-layer errors back
to the original variant and renders only the genuinely transport-level
remainder into this one.
The operating system’s random source could not be read, carrying
the underlying getrandom error’s rendered message. Raised by
crate::Encryptor::aes256, the only caller that draws on it.
Other(String)
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()