#[repr(i32)]pub enum ColorType {
Show 24 variants
Unknown,
Alpha8,
RGB565,
ARGB4444,
RGBA8888,
RGB888x,
BGRA8888,
RGBA1010102,
BGRA1010102,
RGB101010x,
BGR101010x,
BGR101010xXR,
Gray8,
RGBAF16Norm,
RGBAF16,
RGBAF32,
R8G8UNorm,
A16Float,
R16G16Float,
A16UNorm,
R16G16UNorm,
R16G16B16A16UNorm,
SRGBA8888,
R8UNorm,
}
Variants§
Unknown
Alpha8
RGB565
ARGB4444
RGBA8888
RGB888x
BGRA8888
RGBA1010102
BGRA1010102
RGB101010x
BGR101010x
BGR101010xXR
Gray8
RGBAF16Norm
RGBAF16
RGBAF32
R8G8UNorm
A16Float
R16G16Float
A16UNorm
R16G16UNorm
R16G16B16A16UNorm
SRGBA8888
R8UNorm
Implementations§
source§impl ColorType
impl ColorType
pub const fn n32() -> Self
👎Deprecated since 0.51.0: Use ColorType::N32
pub const N32: Self = _
pub const COUNT: usize = 24usize
pub fn bytes_per_pixel(self) -> usize
pub fn is_always_opaque(self) -> bool
pub fn validate_alpha_type(self, alpha_type: AlphaType) -> Option<AlphaType>
Trait Implementations§
source§impl PartialEq<ColorType> for ColorType
impl PartialEq<ColorType> for ColorType
impl Copy for ColorType
impl Eq for ColorType
impl StructuralEq for ColorType
impl StructuralPartialEq for ColorType
Auto Trait Implementations§
impl RefUnwindSafe for ColorType
impl Send for ColorType
impl Sync for ColorType
impl Unpin for ColorType
impl UnwindSafe for ColorType
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