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§fn clone(&self) -> ImageBitmapError
fn clone(&self) -> ImageBitmapError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§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 From<ImageBitmapError> for SvgPainterError
impl From<ImageBitmapError> for SvgPainterError
Source§fn from(source: ImageBitmapError) -> Self
fn from(source: ImageBitmapError) -> Self
Converts to this type from the input type.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
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