pub struct WindowIcon {
pub rgba: Vec<u8>,
pub width: u32,
pub height: u32,
}Expand description
Window icon as raw RGBA8 bytes (4 bytes per pixel, row-major, top-left origin).
Fields§
§rgba: Vec<u8>§width: u32§height: u32Implementations§
Source§impl WindowIcon
impl WindowIcon
Sourcepub fn from_rgba(rgba: Vec<u8>, width: u32, height: u32) -> Self
pub fn from_rgba(rgba: Vec<u8>, width: u32, height: u32) -> Self
Construct an icon from a row-major RGBA8 buffer.
The buffer must contain exactly width * height * 4 bytes. The
app-level manager validates this when converting to the
platform icon and logs + drops the icon on mismatch — the
window still opens, just without a custom icon.
Sourcepub fn expected_len(&self) -> usize
pub fn expected_len(&self) -> usize
Expected buffer size in bytes for width × height RGBA8.
Trait Implementations§
Source§impl Clone for WindowIcon
impl Clone for WindowIcon
Source§fn clone(&self) -> WindowIcon
fn clone(&self) -> WindowIcon
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WindowIcon
impl Debug for WindowIcon
impl Eq for WindowIcon
Source§impl PartialEq for WindowIcon
impl PartialEq for WindowIcon
impl StructuralPartialEq for WindowIcon
Auto Trait Implementations§
impl Freeze for WindowIcon
impl RefUnwindSafe for WindowIcon
impl Send for WindowIcon
impl Sync for WindowIcon
impl Unpin for WindowIcon
impl UnsafeUnpin for WindowIcon
impl UnwindSafe for WindowIcon
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