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]
impl Debug for BadIcon
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for BadIcon
[src]
impl Clone for BadIcon
fn clone(&self) -> BadIcon
[src]
fn clone(&self) -> BadIcon
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Copy for BadIcon
[src]
impl Copy for BadIcon
impl PartialEq for BadIcon
[src]
impl PartialEq for BadIcon
fn eq(&self, other: &BadIcon) -> bool
[src]
fn eq(&self, other: &BadIcon) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &BadIcon) -> bool
[src]
fn ne(&self, other: &BadIcon) -> bool
This method tests for !=
.
impl Eq for BadIcon
[src]
impl Eq for BadIcon
impl Display for BadIcon
[src]
impl Display for BadIcon
fn fmt(&self, formatter: &mut Formatter) -> Result
[src]
fn fmt(&self, formatter: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Error for BadIcon
[src]
impl Error for BadIcon