#[non_exhaustive]pub enum MalformedKind {
JpegSegment,
TiffHeader,
IfdEntry,
IsoBmffBox,
EbmlElement,
}Expand description
Categorizes the structural unit that produced a Error::Malformed.
Variants describe the kind of bytes that failed to parse (a JPEG segment,
a TIFF header, an IFD entry, an ISO BMFF box, an EBML element), not the
outer file format. Format-specific context — e.g. “cr3:”, “heif idat:” —
is conveyed in the accompanying message string.
This intentionally avoids a parallel format-level taxonomy (Heif,
Cr3Container, Raf, …): those families are all built on top of one of
the structural units listed here, so adding a row per format would create
non-orthogonal categories that overlap with the structural ones.
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.
Trait Implementations§
Source§impl Clone for MalformedKind
impl Clone for MalformedKind
Source§fn clone(&self) -> MalformedKind
fn clone(&self) -> MalformedKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MalformedKind
impl Debug for MalformedKind
Source§impl Display for MalformedKind
impl Display for MalformedKind
Source§impl PartialEq for MalformedKind
impl PartialEq for MalformedKind
Source§fn eq(&self, other: &MalformedKind) -> bool
fn eq(&self, other: &MalformedKind) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for MalformedKind
impl Eq for MalformedKind
impl StructuralPartialEq for MalformedKind
Auto Trait Implementations§
impl Freeze for MalformedKind
impl RefUnwindSafe for MalformedKind
impl Send for MalformedKind
impl Sync for MalformedKind
impl Unpin for MalformedKind
impl UnsafeUnpin for MalformedKind
impl UnwindSafe for MalformedKind
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