pub enum Error {
MissingImage(usize),
Convert(ImageError),
WidthTooLarge(u32),
HeightTooLarge(u32),
MismatchSizes(usize, u32, u32, usize),
MismatchAlphaSizes(usize, u32, u32, usize),
Raw1InvalidAlphaBits(u32),
ColorMapLengthInvalid(usize),
PaletteWrongSize(usize),
Dxt1RawConvertFail,
}Expand description
Errors that can occur during BLP conversion operations
Variants§
MissingImage(usize)
The requested mipmap level does not exist in the BLP file
Convert(ImageError)
Error during image conversion operations
WidthTooLarge(u32)
Image width exceeds the maximum supported value of 65,535 pixels
HeightTooLarge(u32)
Image height exceeds the maximum supported value of 65,535 pixels
MismatchSizes(usize, u32, u32, usize)
Mismatch between header-declared size and actual pixel data size
MismatchAlphaSizes(usize, u32, u32, usize)
Mismatch between expected and actual alpha channel data size
Raw1InvalidAlphaBits(u32)
Invalid alpha bit depth for Raw1 format (only 0, 1, 4, or 8 are valid)
ColorMapLengthInvalid(usize)
Color map does not contain exactly 256 entries as required
PaletteWrongSize(usize)
Palette size mismatch (expected 256 colors)
Dxt1RawConvertFail
Failed to convert decompressed DXT1 data to raw format
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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<ImageError> for Error
impl From<ImageError> for Error
Source§fn from(source: ImageError) -> Self
fn from(source: ImageError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin 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
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