pub enum ParseError {
InvalidMagic {
expected: u16,
found: u16,
},
InvalidByteOrder(u16),
InvalidIfd {
offset: u64,
reason: String,
},
TagNotFound(TiffTag),
OffsetOutOfBounds {
offset: u64,
size: u64,
file_size: u64,
},
UnknownDataType(u16),
InvalidDimensions {
width: u32,
height: u32,
},
CircularReference(u64),
BinaryParse(String),
}Expand description
TIFF and binary parse errors.
Variants§
InvalidMagic
Invalid TIFF magic number.
InvalidByteOrder(u16)
Invalid byte order marker.
InvalidIfd
Invalid or malformed IFD.
TagNotFound(TiffTag)
Required tag not found.
OffsetOutOfBounds
Offset exceeds file boundaries.
Fields
UnknownDataType(u16)
Unknown TIFF data type.
InvalidDimensions
Invalid image dimensions.
CircularReference(u64)
Circular reference detected in IFD chain.
BinaryParse(String)
Binary parse error (from binrw or other parsers).
Trait Implementations§
Source§impl Debug for ParseError
impl Debug for ParseError
Source§impl Display for ParseError
impl Display for ParseError
Source§impl Error for ParseError
impl Error for ParseError
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()
Source§impl From<ParseError> for RawError
impl From<ParseError> for RawError
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ParseError
impl RefUnwindSafe for ParseError
impl Send for ParseError
impl Sync for ParseError
impl Unpin for ParseError
impl UnsafeUnpin for ParseError
impl UnwindSafe for ParseError
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
Source§impl<T> CustomError for T
impl<T> CustomError for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more