#[non_exhaustive]pub enum ConvertError {
Unsupported(String),
NeedsOcr {
pages: Vec<u32>,
page_count: u32,
},
Malformed {
part: Option<String>,
detail: String,
},
Encrypted,
ResourceLimit {
limit: &'static str,
detail: String,
},
MissingPart {
part: String,
},
Io(Error),
}Expand description
Why a conversion could not produce a useful result.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unsupported(String)
The format is unknown or cannot be converted at all.
NeedsOcr
Some pages of a PDF are scanned or image-only and need OCR, which anydoc does not do. Nothing is returned for the document, so output missing those pages never passes as complete.
Malformed
The document is structurally unusable - no meaningful content could be
extracted. part names the package part or stream when known.
Fields
Encrypted
The document is encrypted or password-protected.
ResourceLimit
A fixed safety limit was exceeded (decompression, nesting depth, node
count, repeat expansion, retained asset bytes). These are hard errors
in every case; see package::limits for the documented defaults.
Fields
MissingPart
A part required for any meaningful output is missing.
Io(Error)
The input could not be read.
Implementations§
Trait Implementations§
Source§impl Debug for ConvertError
impl Debug for ConvertError
Source§impl Display for ConvertError
impl Display for ConvertError
Source§impl Error for ConvertError
impl Error for ConvertError
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 !RefUnwindSafe for ConvertError
impl !UnwindSafe for ConvertError
impl Freeze for ConvertError
impl Send for ConvertError
impl Sync for ConvertError
impl Unpin for ConvertError
impl UnsafeUnpin for ConvertError
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
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