Struct moon_engine::math::Color8
source · [−]Expand description
Tuple Fields
0: u8
1: u8
2: u8
3: u8
Implementations
sourceimpl 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 RefUnwindSafe for Color8
impl Send for Color8
impl Sync for Color8
impl Unpin for Color8
impl UnwindSafe for Color8
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SP where
SS: SubsetOf<SP>,
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 more
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).
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.
fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts self
to the equivalent element of its superset.