#[repr(C)]pub struct ColorU {
pub r: u8,
pub g: u8,
pub b: u8,
pub a: u8,
}
Fields§
§r: u8
§g: u8
§b: u8
§a: u8
Implementations§
Source§impl ColorU
impl ColorU
pub fn new(r: u8, g: u8, b: u8, a: u8) -> ColorU
pub fn transparent_black() -> ColorU
pub fn from_u32(rgba: u32) -> ColorU
pub fn black() -> ColorU
pub fn white() -> ColorU
pub fn to_f32(&self) -> ColorF
pub fn is_opaque(&self) -> bool
pub fn is_fully_transparent(&self) -> bool
Trait Implementations§
Source§impl Ord for ColorU
impl Ord for ColorU
Source§impl PartialOrd for ColorU
impl PartialOrd for ColorU
impl Copy for ColorU
impl Eq for ColorU
impl StructuralPartialEq for ColorU
Auto Trait Implementations§
impl Freeze for ColorU
impl RefUnwindSafe for ColorU
impl Send for ColorU
impl Sync for ColorU
impl Unpin for ColorU
impl UnwindSafe for ColorU
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<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more