#[non_exhaustive]pub enum Error {
Empty,
PfbSegment {
at: usize,
},
NoEexec,
EexecGarbage,
NoCharStrings,
}Expand description
Why a Type 1 font program could not be read.
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.
Empty
The blob is shorter than the smallest thing that could be a font.
PfbSegment
A PFB container’s segment headers did not describe the blob: a segment
length running past the end, a tag byte other than 0x80, or a segment
type outside 1–3.
Carries the offset of the offending header, which is what a fuzz reduction wants.
NoEexec
No eexec token was found, so the font has no private portion — and a
Type 1 font’s charstrings live entirely inside it.
EexecGarbage
The eexec section decrypted to something that is not a PostScript
private dictionary, which means the wrong bytes were fed to the cipher.
NoCharStrings
The program parsed but declared no /CharStrings, so there is nothing
to draw.
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)>
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()
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
impl UnwindSafe 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