#[non_exhaustive]pub enum PixelFormat {
Argb8888,
Xrgb8888,
}Expand description
Layout of one u32 in a Frame’s pixel slice.
The word is always 0xAARRGGBB in native endianness. On little-endian targets
that is byte order B, G, R, A, which is what DRM’s ARGB8888/XRGB8888
fourccs and Win32 BI_RGB DIB sections both mean. It is deliberately not
tiny-skia’s Pixmap layout, which is R, G, B, A in byte order; anything
bridging the two owes a swizzle.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Argb8888
0xAARRGGBB. The alpha byte is meaningful.
Xrgb8888
0xXXRRGGBB. The high byte is ignored by the scanout hardware.
Implementations§
Source§impl PixelFormat
impl PixelFormat
Trait Implementations§
Source§impl Clone for PixelFormat
impl Clone for PixelFormat
Source§fn clone(&self) -> PixelFormat
fn clone(&self) -> PixelFormat
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 moreimpl Copy for PixelFormat
Source§impl Debug for PixelFormat
impl Debug for PixelFormat
impl Eq for PixelFormat
Source§impl Hash for PixelFormat
impl Hash for PixelFormat
Source§impl PartialEq for PixelFormat
impl PartialEq for PixelFormat
impl StructuralPartialEq for PixelFormat
Auto Trait Implementations§
impl Freeze for PixelFormat
impl RefUnwindSafe for PixelFormat
impl Send for PixelFormat
impl Sync for PixelFormat
impl Unpin for PixelFormat
impl UnsafeUnpin for PixelFormat
impl UnwindSafe for PixelFormat
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