pub enum ImageBitmapError {
InvalidDimensions,
DimensionsTooLarge,
PixelDataLengthMismatch {
expected: usize,
actual: usize,
},
}Expand description
Errors returned while constructing an ImageBitmap.
Variants§
InvalidDimensions
The width or the height is zero.
DimensionsTooLarge
The byte size of the pixels, width times height times four, does not fit in usize.
PixelDataLengthMismatch
The pixel buffer length does not match the width, height and pixel format.
Trait Implementations§
Source§impl Clone for ImageBitmapError
impl Clone for ImageBitmapError
Source§impl Debug for ImageBitmapError
impl Debug for ImageBitmapError
Source§impl Display for ImageBitmapError
impl Display for ImageBitmapError
impl Eq for ImageBitmapError
Source§impl Error for ImageBitmapError
impl Error for ImageBitmapError
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 ImageBitmapError
impl PartialEq for ImageBitmapError
impl StructuralPartialEq for ImageBitmapError
Auto Trait Implementations§
impl Freeze for ImageBitmapError
impl RefUnwindSafe for ImageBitmapError
impl Send for ImageBitmapError
impl Sync for ImageBitmapError
impl Unpin for ImageBitmapError
impl UnsafeUnpin for ImageBitmapError
impl UnwindSafe for ImageBitmapError
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