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ยง
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
ยงimpl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
ยงfn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.ยงfn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
fn into_any_rc(self: Rc<T, Global>) -> Rc<dyn Any, Global>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.ยงfn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
โs vtable from &Trait
โs.ยงfn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
โs vtable from &mut Trait
โs.sourceยงimpl<T> Instrument for T
impl<T> Instrument for T
sourceยงfn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourceยงfn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
ยง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
sourceยงimpl<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,
sourceยงfn 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()
.