#[non_exhaustive]pub enum Error {
FunctionArity {
expected: usize,
got: usize,
outputs: usize,
got_outputs: usize,
},
FunctionInterval,
ImageBadDict {
what: &'static str,
},
ImageNoColorSpace,
ImageUndecodable {
what: &'static str,
},
ImageTooLarge,
CodecRejected {
codec: &'static str,
},
Unresolved(ObjRef),
}Expand description
What went wrong in a page-level operation that can actually fail.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
FunctionArity
A function was evaluated with a number of inputs its /Domain does
not describe, or an output slice shorter than its /Range
(ISO 32000-1 §7.10.1).
Fields
FunctionInterval
A function’s /Domain names an interval whose low bound exceeds its
high bound, which PDFium refuses to evaluate against.
ImageBadDict
An image dictionary’s /Width, /Height or /BitsPerComponent is
outside the range PDFium accepts.
ImageNoColorSpace
No colorspace could be resolved for a non-mask image, so its samples cannot be turned into pixels.
ImageUndecodable
The image’s sample data could not be produced: a filter with no decoder, a codec that rejected the stream, or a chain that decoded to fewer bytes than one scanline needs.
ImageTooLarge
The image is larger than Limits::max_image_bytes allows, or its
pitch computation overflowed.
CodecRejected
A JBIG2 or JPEG 2000 codec rejected its input.
Unresolved(ObjRef)
An indirect object a page-level structure needed could not be fetched.
Trait Implementations§
impl Eq for Error
Source§impl Error for Error
impl Error for Error
1.30.0 · 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()