Enum winit::BadIcon
[−]
[src]
pub enum BadIcon { ByteCountNotDivisibleBy4 { byte_count: usize, }, DimensionsVsPixelCount { width: u32, height: u32, width_x_height: usize, pixel_count: usize, }, }
An error produced when using Icon::from_rgba
with invalid arguments.
Variants
ByteCountNotDivisibleBy4
Produced when the length of the rgba
argument isn't divisible by 4, thus rgba
can't be
safely interpreted as 32bpp RGBA pixels.
Fields of ByteCountNotDivisibleBy4
byte_count: usize |
DimensionsVsPixelCount
Produced when the number of pixels (rgba.len() / 4
) isn't equal to width * height
.
At least one of your arguments is incorrect.
Fields of DimensionsVsPixelCount
width: u32 | |
height: u32 | |
width_x_height: usize | |
pixel_count: usize |
Trait Implementations
impl Debug for BadIcon
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Clone for BadIcon
[src]
fn clone(&self) -> BadIcon
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Copy for BadIcon
[src]
impl PartialEq for BadIcon
[src]
fn eq(&self, __arg_0: &BadIcon) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &BadIcon) -> bool
[src]
This method tests for !=
.
impl Eq for BadIcon
[src]
impl Display for BadIcon
[src]
fn fmt(&self, formatter: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more