pub struct RgbaColor<T> {
pub alpha: T,
pub red: T,
pub green: T,
pub blue: T,
}
Expand description
RgbaColor stores the red, green, blue and alpha components of a color
with the precision of the generic parameter T. For example if T is f32,
the values are normalized between 0 and 1. If T is u8, they values range
is 0 to 255.
This is merely a helper class for use with Color
.
Fields
alpha: T
The alpha component.
red: T
The red channel.
green: T
The green channel.
blue: T
The blue channel.
Trait Implementations
impl<T> PartialEq<RgbaColor<T>> for RgbaColor<T>where
T: PartialEq<T>,
impl<T> PartialEq<RgbaColor<T>> for RgbaColor<T>where
T: PartialEq<T>,
impl<T> Copy for RgbaColor<T>where
T: Copy,
impl<T> StructuralPartialEq for RgbaColor<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for RgbaColor<T>where
T: RefUnwindSafe,
impl<T> Send for RgbaColor<T>where
T: Send,
impl<T> Sync for RgbaColor<T>where
T: Sync,
impl<T> Unpin for RgbaColor<T>where
T: Unpin,
impl<T> UnwindSafe for RgbaColor<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> IsDefault for Twhere
T: Default + PartialEq<T> + Copy,
impl<T> IsDefault for Twhere
T: Default + PartialEq<T> + Copy,
fn is_default(&self) -> bool
fn is_default(&self) -> bool
Checks that type has a default value.
impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
fn null_value() -> T
fn null_value() -> T
The none-equivalent value.
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<R, P> ReadPrimitive<R> for Pwhere
R: Read + ReadEndian<P>,
P: Default,
impl<R, P> ReadPrimitive<R> for Pwhere
R: Read + ReadEndian<P>,
P: Default,
sourcefn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian()
.sourcefn read_from_big_endian(read: &mut R) -> Result<Self, Error>
fn read_from_big_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_big_endian()
.sourcefn read_from_native_endian(read: &mut R) -> Result<Self, Error>
fn read_from_native_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_native_endian()
.