pub enum TiffError {
Io(IoError),
InvalidMagic(u16),
InvalidVersion(u16),
InvalidBigTiffOffsetSize(u16),
FileTooSmall {
required: u64,
actual: u64,
},
InvalidIfdOffset(u64),
MissingTag(&'static str),
InvalidTagValue {
tag: &'static str,
message: String,
},
UnsupportedCompression(String),
StripOrganization,
UnknownFieldType(u16),
}Expand description
Errors that can occur when parsing TIFF files
Variants§
Io(IoError)
I/O error while reading the file
InvalidMagic(u16)
Invalid TIFF magic bytes (not II or MM)
InvalidVersion(u16)
Invalid TIFF version number
InvalidBigTiffOffsetSize(u16)
Invalid BigTIFF offset byte size (must be 8)
FileTooSmall
File is too small to contain a valid TIFF header
InvalidIfdOffset(u64)
Invalid IFD offset (points outside file or to invalid location)
MissingTag(&'static str)
Required tag is missing from IFD
InvalidTagValue
Tag has unexpected type or count
UnsupportedCompression(String)
Unsupported compression scheme
StripOrganization
File uses strips instead of tiles
UnknownFieldType(u16)
Unknown field type in IFD entry
Trait Implementations§
Source§impl Error for TiffError
impl Error for TiffError
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<TiffError> for FormatError
impl From<TiffError> for FormatError
Source§impl From<ValidationError> for TiffError
impl From<ValidationError> for TiffError
Source§fn from(error: ValidationError) -> Self
fn from(error: ValidationError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for TiffError
impl RefUnwindSafe for TiffError
impl Send for TiffError
impl Sync for TiffError
impl Unpin for TiffError
impl UnwindSafe for TiffError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreCreates a shared type from an unshared type.