pub enum BadIcon {
ByteCountNotDivisibleBy4 {
byte_count: usize,
},
DimensionsVsPixelCount {
width: u32,
height: u32,
width_x_height: usize,
pixel_count: usize,
},
}
Expand description
An error produced when using Icon::from_rgba
with invalid arguments.
Variants
ByteCountNotDivisibleBy4
Fields
byte_count: usize
Produced when the length of the rgba
argument isn’t divisible by 4, thus rgba
can’t be
safely interpreted as 32bpp RGBA pixels.
DimensionsVsPixelCount
Produced when the number of pixels (rgba.len() / 4
) isn’t equal to width * height
.
At least one of your arguments is incorrect.
Trait Implementations
sourceimpl Error for BadIcon
impl Error for BadIcon
sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
sourcefn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
impl Copy for BadIcon
impl Eq for BadIcon
impl StructuralEq for BadIcon
impl StructuralPartialEq for BadIcon
Auto Trait Implementations
impl RefUnwindSafe for BadIcon
impl Send for BadIcon
impl Sync for BadIcon
impl Unpin for BadIcon
impl UnwindSafe for BadIcon
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Resultwhere
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Resultwhere
T: Parameter<Self>,
Sets
value
as a parameter of self
.