pub struct DecodePixels {
pub width: u32,
pub height: u32,
}Expand description
The size something will be decoded to — always at or under the source, never larger. A viewer showing a 64x64 icon full-screen scales it up when drawing; decoding it big would allocate a buffer full of invented pixels.
Fields§
§width: u32§height: u32Implementations§
Source§impl DecodePixels
impl DecodePixels
Sourcepub fn rgba_bytes(self) -> u64
pub fn rgba_bytes(self) -> u64
Bytes an RGBA8 buffer of this size occupies, as u64 because the
arithmetic overflows u32 well before the sizes do.
Trait Implementations§
Source§impl Clone for DecodePixels
impl Clone for DecodePixels
impl Copy for DecodePixels
Source§impl Debug for DecodePixels
impl Debug for DecodePixels
impl Eq for DecodePixels
Source§impl PartialEq for DecodePixels
impl PartialEq for DecodePixels
impl StructuralPartialEq for DecodePixels
Auto Trait Implementations§
impl Freeze for DecodePixels
impl RefUnwindSafe for DecodePixels
impl Send for DecodePixels
impl Sync for DecodePixels
impl Unpin for DecodePixels
impl UnsafeUnpin for DecodePixels
impl UnwindSafe for DecodePixels
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