#[non_exhaustive]pub enum GrayPixelsError {
DimensionsOverflow,
BufferLengthMismatch {
expected: usize,
actual: usize,
},
}Expand description
Errors returned when validating a GrayPixels buffer.
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.
DimensionsOverflow
The image dimensions exceed the byte-slice size supported by this target.
BufferLengthMismatch
The buffer does not contain exactly one byte per pixel.
Trait Implementations§
Source§impl Clone for GrayPixelsError
impl Clone for GrayPixelsError
impl Copy for GrayPixelsError
Source§impl Debug for GrayPixelsError
impl Debug for GrayPixelsError
Source§impl Display for GrayPixelsError
impl Display for GrayPixelsError
impl Eq for GrayPixelsError
Source§impl Error for GrayPixelsError
impl Error for GrayPixelsError
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 PartialEq for GrayPixelsError
impl PartialEq for GrayPixelsError
impl StructuralPartialEq for GrayPixelsError
Auto Trait Implementations§
impl Forget for GrayPixelsError
impl Freeze for GrayPixelsError
impl Move for GrayPixelsError
impl RefUnwindSafe for GrayPixelsError
impl Send for GrayPixelsError
impl Sync for GrayPixelsError
impl Unpin for GrayPixelsError
impl UnsafeUnpin for GrayPixelsError
impl UnwindSafe for GrayPixelsError
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