Enum rich_sdl2_rust::color::pixel::kind::PixelFormatKind
source · #[non_exhaustive]pub enum PixelFormatKind {
Unknown,
Bitmap {
ty: BitmapPixelType,
order: BitmapPixelOrder,
},
Packed {
ty: PackedPixelType,
order: PackedPixelOrder,
layout: PackedPixelLayout,
},
Array {
ty: ArrayPixelType,
order: ArrayPixelOrder,
},
FourCode([u8; 4]),
}
Expand description
A kind of pixel format.
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.
Unknown
A format not supported by SDL2.
Bitmap
An indexed bitmap format with a palette.
Packed
Fields
§
ty: PackedPixelType
The type of the pack.
§
order: PackedPixelOrder
The order of the pack.
§
layout: PackedPixelLayout
The layout of the pack.
A packed pixel format.
Array
A pixel array format.
FourCode([u8; 4])
A special format such as YUV in FourCC code.
Implementations§
Trait Implementations§
source§impl Clone for PixelFormatKind
impl Clone for PixelFormatKind
source§fn clone(&self) -> PixelFormatKind
fn clone(&self) -> PixelFormatKind
Returns a copy of the value. Read more
1.0.0 · 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 PixelFormatKind
impl Debug for PixelFormatKind
source§impl Hash for PixelFormatKind
impl Hash for PixelFormatKind
source§impl PartialEq for PixelFormatKind
impl PartialEq for PixelFormatKind
source§fn eq(&self, other: &PixelFormatKind) -> bool
fn eq(&self, other: &PixelFormatKind) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for PixelFormatKind
impl Eq for PixelFormatKind
impl StructuralPartialEq for PixelFormatKind
Auto Trait Implementations§
impl RefUnwindSafe for PixelFormatKind
impl Send for PixelFormatKind
impl Sync for PixelFormatKind
impl Unpin for PixelFormatKind
impl UnwindSafe for PixelFormatKind
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