Enum zune_core::colorspace::ColorSpace
source · #[non_exhaustive]pub enum ColorSpace {
RGB,
RGBA,
YCbCr,
Luma,
LumaA,
YCCK,
CMYK,
BGR,
BGRA,
Unknown,
}
Expand description
All possible image colorspaces Some of them aren’t yet supported exist here.
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.
RGB
Red, Green , Blue
RGBA
Red, Green, Blue, Alpha
YCbCr
YUV colorspace
Luma
Grayscale colorspace
LumaA
Grayscale with alpha colorspace
YCCK
CMYK
Cyan , Magenta, Yellow, Black
BGR
Blue, Green, Red
BGRA
Blue, Green, Red, Alpha
Unknown
The colorspace is unknown
Implementations§
source§impl ColorSpace
impl ColorSpace
pub const fn num_components(&self) -> usize
pub const fn has_alpha(&self) -> bool
pub const fn is_grayscale(&self) -> bool
Trait Implementations§
source§impl Clone for ColorSpace
impl Clone for ColorSpace
source§fn clone(&self) -> ColorSpace
fn clone(&self) -> ColorSpace
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 ColorSpace
impl Debug for ColorSpace
source§impl PartialEq for ColorSpace
impl PartialEq for ColorSpace
source§fn eq(&self, other: &ColorSpace) -> bool
fn eq(&self, other: &ColorSpace) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for ColorSpace
impl Eq for ColorSpace
impl StructuralEq for ColorSpace
impl StructuralPartialEq for ColorSpace
Auto Trait Implementations§
impl RefUnwindSafe for ColorSpace
impl Send for ColorSpace
impl Sync for ColorSpace
impl Unpin for ColorSpace
impl UnwindSafe for ColorSpace
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