#[non_exhaustive]pub enum UnreadableObjectPolicy {
TreatAsUndefined,
Refuse,
}Expand description
What to do when one indirect object cannot be loaded (Pass 283.0).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
TreatAsUndefined
Load the document without it, and record a
LoadAnomaly::ObjectUnreadable.
§7.3.10: an indirect reference to an undefined object “shall not be considered an error by a conforming reader; it shall be treated as a reference to the null object.” An object whose bytes will not parse is undefined as far as every consumer is concerned, so this is the standard’s own answer applied to the state the file is in — not a repair, and nothing invented.
Refuse
Refuse the document, as pdfcer did before Pass 283.0.
Trait Implementations§
Source§impl Clone for UnreadableObjectPolicy
impl Clone for UnreadableObjectPolicy
impl Copy for UnreadableObjectPolicy
Source§impl Debug for UnreadableObjectPolicy
impl Debug for UnreadableObjectPolicy
Source§impl Default for UnreadableObjectPolicy
impl Default for UnreadableObjectPolicy
impl Eq for UnreadableObjectPolicy
Source§impl PartialEq for UnreadableObjectPolicy
impl PartialEq for UnreadableObjectPolicy
impl StructuralPartialEq for UnreadableObjectPolicy
Auto Trait Implementations§
impl Forget for UnreadableObjectPolicy
impl Freeze for UnreadableObjectPolicy
impl Move for UnreadableObjectPolicy
impl RefUnwindSafe for UnreadableObjectPolicy
impl Send for UnreadableObjectPolicy
impl Sync for UnreadableObjectPolicy
impl Unpin for UnreadableObjectPolicy
impl UnsafeUnpin for UnreadableObjectPolicy
impl UnwindSafe for UnreadableObjectPolicy
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