pub enum DocError {
MissingKey(String),
UnexpectedType,
Parser(String),
DepthExceeded,
ValueTooLong {
len: usize,
max: u32,
},
TypeMismatch {
expected: String,
got: String,
},
InvalidChoiceIndex {
index: usize,
count: usize,
},
FieldNotFound(String),
InvalidIndex(usize),
NotFound(String),
NotSupported(String),
}Expand description
Errors that can occur during document structure parsing.
Variants§
MissingKey(String)
A required dictionary key is missing.
UnexpectedType
An object had an unexpected type.
Parser(String)
An error propagated from the parser layer.
DepthExceeded
A tree or linked-list traversal exceeded the maximum allowed depth.
ValueTooLong
The provided value exceeds the field’s maximum length.
TypeMismatch
The provided value is not valid for the target field type.
InvalidChoiceIndex
A choice index is out of range.
FieldNotFound(String)
The named field was not found in the form.
InvalidIndex(usize)
An index was out of range.
NotFound(String)
The requested named entry was not found.
NotSupported(String)
The requested operation is not supported.
§Not Supported
Returned by mutation APIs that are intentionally stubbed out because rpdfium is a read-only library (per ADR-017). The contained string describes the unsupported operation.
Trait Implementations§
Source§impl Error for DocError
impl Error for DocError
1.30.0 · 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 Freeze for DocError
impl RefUnwindSafe for DocError
impl Send for DocError
impl Sync for DocError
impl Unpin for DocError
impl UnsafeUnpin for DocError
impl UnwindSafe for DocError
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