pub enum FloatColor {
Rgb(SRGB),
Hsl(HSL),
Hwb(HWB),
}Expand description
Floating-point RGB/HSL/HWB used when a color carries none components.
Variants§
Implementations§
Source§impl FloatColor
impl FloatColor
Sourcepub fn convert_to<T: FromAnyColorspace>(&self) -> T
pub fn convert_to<T: FromAnyColorspace>(&self) -> T
switch (e) { inline else => |v| v.into(T) }
pub fn payload_type_id(&self) -> TypeId
Sourcepub fn ordinal(&self) -> u32
pub fn ordinal(&self) -> u32
Stable per-enum ordinal — feeds CssColor::hash. Do NOT reorder rows.
pub fn components(&self) -> (f32, f32, f32, f32)
pub fn css_name(&self) -> &'static str
Trait Implementations§
Source§impl Clone for FloatColor
impl Clone for FloatColor
Source§fn clone(&self) -> FloatColor
fn clone(&self) -> FloatColor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for FloatColor
Source§impl Debug for FloatColor
impl Debug for FloatColor
Source§impl PartialEq for FloatColor
impl PartialEq for FloatColor
impl StructuralPartialEq for FloatColor
Auto Trait Implementations§
impl Freeze for FloatColor
impl RefUnwindSafe for FloatColor
impl Send for FloatColor
impl Sync for FloatColor
impl Unpin for FloatColor
impl UnsafeUnpin for FloatColor
impl UnwindSafe for FloatColor
Blanket Implementations§
Source§impl<T> AsCtxPtr for Twhere
T: ?Sized,
impl<T> AsCtxPtr for Twhere
T: ?Sized,
Source§fn as_ctx_ptr(&self) -> *mut Selfwhere
Self: Sized,
fn as_ctx_ptr(&self) -> *mut Selfwhere
Self: Sized,
self’s address as *mut Self for deferred-task / scopeguard /
ref_guard ctx slots. The closures/trampolines deref it as shared
(&*p) — every method they reach is &self post-R-2, so no write
provenance is required; the *mut spelling is purely to match the
existing DerefOnDrop / HasAutoFlush / RefCount ABI.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