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
ByteCountNotDivisibleBy4Produced 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 |
DimensionsVsPixelCountProduced 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 BadIconfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Clone for BadIcon[src]
impl Clone for BadIconfn clone(&self) -> BadIcon[src]
fn clone(&self) -> BadIconReturns 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 BadIconimpl PartialEq for BadIcon[src]
impl PartialEq for BadIconfn eq(&self, other: &BadIcon) -> bool[src]
fn eq(&self, other: &BadIcon) -> boolThis 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) -> boolThis method tests for !=.
impl Eq for BadIcon[src]
impl Eq for BadIconimpl Display for BadIcon[src]
impl Display for BadIconfn fmt(&self, formatter: &mut Formatter) -> Result[src]
fn fmt(&self, formatter: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Error for BadIcon[src]
impl Error for BadIcon