pub struct Color8(pub u8, pub u8, pub u8, pub u8);
Expand description
Tuple Fields§
§0: u8
§1: u8
§2: u8
§3: u8
Implementations§
Source§impl Color8
impl Color8
Sourcepub const fn r(&self) -> u8
pub const fn r(&self) -> u8
Get the Red component of the Color8
.
This is the same as the X component.
Sourcepub const fn x(&self) -> u8
pub const fn x(&self) -> u8
Get the X component of the Color8
.
This is the same as the Red component.
Sourcepub const fn g(&self) -> u8
pub const fn g(&self) -> u8
Get the Green component of the Color8
.
This is the same as the Y component.
Sourcepub const fn y(&self) -> u8
pub const fn y(&self) -> u8
Get the Y component of the Color8
.
This is the same as the Green component.
Sourcepub const fn b(&self) -> u8
pub const fn b(&self) -> u8
Get the Blue component of the Color8
.
This is the same as the Z component.
Sourcepub const fn z(&self) -> u8
pub const fn z(&self) -> u8
Get the Z component of the Color8
.
This is the same as the Blue component.
Trait Implementations§
impl Copy for Color8
Auto Trait Implementations§
impl Freeze for Color8
impl RefUnwindSafe for Color8
impl Send for Color8
impl Sync for Color8
impl Unpin for Color8
impl UnwindSafe for Color8
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.