pub struct RgbaComponent(pub f32);
Expand description
Color functions argument conversion helper.
Don’t use this value directly, if a function takes Into<RgbaComponent>
you can use one of the
types this converts from:
f32
,f64
andFactor
for a value in the0.0
to1.0
range.u8
for a value in the0
to255
range.FactorPercent
for a percentage value.
Tuple Fields§
§0: f32
Trait Implementations§
source§impl Clone for RgbaComponent
impl Clone for RgbaComponent
source§fn clone(&self) -> RgbaComponent
fn clone(&self) -> RgbaComponent
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl From<Factor> for RgbaComponent
impl From<Factor> for RgbaComponent
Color channel value is in the [0..=1] range.
source§impl From<FactorPercent> for RgbaComponent
impl From<FactorPercent> for RgbaComponent
Color channel value is in the [0..=100] range.
source§fn from(p: FactorPercent) -> Self
fn from(p: FactorPercent) -> Self
Converts to this type from the input type.
source§impl From<f32> for RgbaComponent
impl From<f32> for RgbaComponent
Color channel value is in the [0..=1] range.
source§impl From<f64> for RgbaComponent
impl From<f64> for RgbaComponent
Color channel value is in the [0..=1] range.
source§impl From<u8> for RgbaComponent
impl From<u8> for RgbaComponent
Color channel value is in the [0..=255] range.
impl Copy for RgbaComponent
Auto Trait Implementations§
impl Freeze for RgbaComponent
impl RefUnwindSafe for RgbaComponent
impl Send for RgbaComponent
impl Sync for RgbaComponent
impl Unpin for RgbaComponent
impl UnwindSafe for RgbaComponent
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)