#[non_exhaustive]pub enum BmpDecoderErrors {
InvalidMagicBytes,
TooSmallBuffer(usize, usize),
GenericStatic(&'static str),
Generic(String),
TooLargeDimensions(&'static str, usize, usize),
OverFlowOccurred,
IoErrors(ZByteIoError),
}Expand description
BMP errors that can occur during decoding
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.
InvalidMagicBytes
The file/bytes do not start with BM
TooSmallBuffer(usize, usize)
The output buffer is too small, expected at least a size but got another size
GenericStatic(&'static str)
Generic message
Generic(String)
Generic allocated message
TooLargeDimensions(&'static str, usize, usize)
Too large dimensions for a given width or height
OverFlowOccurred
A calculation overflowed
IoErrors(ZByteIoError)
Trait Implementations§
Source§impl Debug for BmpDecoderErrors
impl Debug for BmpDecoderErrors
Source§impl From<BmpDecoderErrors> for ImageErrors
impl From<BmpDecoderErrors> for ImageErrors
Source§fn from(value: BmpDecoderErrors) -> Self
fn from(value: BmpDecoderErrors) -> Self
Converts to this type from the input type.
Source§impl From<ZByteIoError> for BmpDecoderErrors
impl From<ZByteIoError> for BmpDecoderErrors
Source§fn from(value: ZByteIoError) -> BmpDecoderErrors
fn from(value: ZByteIoError) -> BmpDecoderErrors
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for BmpDecoderErrors
impl !UnwindSafe for BmpDecoderErrors
impl Freeze for BmpDecoderErrors
impl Send for BmpDecoderErrors
impl Sync for BmpDecoderErrors
impl Unpin for BmpDecoderErrors
impl UnsafeUnpin for BmpDecoderErrors
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> 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