pub enum Error {
Io(Error),
Parse(String),
Password,
UnsupportedEncryption(String),
PageOutOfRange(usize),
Page {
index: usize,
message: String,
},
Render(String),
}Variants§
Io(Error)
The file could not be read from disk.
Parse(String)
The file is not a PDF or its cross-reference structure is beyond repair.
Password
The document is encrypted and the supplied password does not open it.
UnsupportedEncryption(String)
The document uses an encryption scheme this crate does not implement.
PageOutOfRange(usize)
A page index past the end of the document.
Page
A page exists but its content could not be processed.
Render(String)
Rendering failed (allocation, encoding).
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)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Forget for Error
impl Freeze for Error
impl Move for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
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
Mutably borrows from an owned value. Read more