pub enum IffError {
Show 14 variants
InvalidMagic {
expected: u32,
got: u32,
},
UnsupportedVersion(u32),
DimensionTooLarge {
dimension: u32,
max: u32,
},
InvalidWaveletCoefficient {
x: usize,
y: usize,
level: usize,
},
InvalidRegion {
x: u16,
y: u16,
w: u16,
h: u16,
},
InvalidVortex {
x: u16,
y: u16,
},
FixedPointOverflow {
operation: String,
},
InsufficientData {
expected: usize,
got: usize,
},
CorruptedBitstream {
offset: usize,
reason: String,
},
Io(Error),
Serialization(String),
Encoding(String),
Decoding(String),
Other(String),
}Expand description
Errors that can occur during IFF encoding/decoding
Variants§
InvalidMagic
Invalid magic number in file header
UnsupportedVersion(u32)
Unsupported version
DimensionTooLarge
Image dimensions exceed maximum
InvalidWaveletCoefficient
Invalid wavelet coefficient
InvalidRegion
Invalid region descriptor
InvalidVortex
Invalid vortex descriptor
FixedPointOverflow
Fixed-point overflow
InsufficientData
Insufficient data
CorruptedBitstream
Corrupted bitstream
Io(Error)
IO error
Serialization(String)
Serialization error
Encoding(String)
Encoding error
Decoding(String)
Decoding error
Other(String)
Generic error
Trait Implementations§
Source§impl Error for IffError
impl Error for IffError
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()
Auto Trait Implementations§
impl Freeze for IffError
impl !RefUnwindSafe for IffError
impl Send for IffError
impl Sync for IffError
impl Unpin for IffError
impl !UnwindSafe for IffError
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> 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