Enum lightningcss::values::color::FloatColor
source · pub enum FloatColor {
RGB(SRGB),
HSL(HSL),
HWB(HWB),
}
Expand description
A floating point representation of color types that
are usually stored as RGBA. These are used when there
are any none
components, which are represented as NaN.
Variants§
Trait Implementations§
source§impl Clone for FloatColor
impl Clone for FloatColor
source§fn clone(&self) -> FloatColor
fn clone(&self) -> FloatColor
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 Debug for FloatColor
impl Debug for FloatColor
source§impl<'de> Deserialize<'de> for FloatColor
impl<'de> Deserialize<'de> for FloatColor
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<FloatColor> for A98
impl From<FloatColor> for A98
source§fn from(color: FloatColor) -> A98
fn from(color: FloatColor) -> A98
Converts to this type from the input type.
source§impl From<FloatColor> for HSL
impl From<FloatColor> for HSL
source§fn from(color: FloatColor) -> HSL
fn from(color: FloatColor) -> HSL
Converts to this type from the input type.
source§impl From<FloatColor> for HWB
impl From<FloatColor> for HWB
source§fn from(color: FloatColor) -> HWB
fn from(color: FloatColor) -> HWB
Converts to this type from the input type.
source§impl From<FloatColor> for LAB
impl From<FloatColor> for LAB
source§fn from(color: FloatColor) -> LAB
fn from(color: FloatColor) -> LAB
Converts to this type from the input type.
source§impl From<FloatColor> for LCH
impl From<FloatColor> for LCH
source§fn from(color: FloatColor) -> LCH
fn from(color: FloatColor) -> LCH
Converts to this type from the input type.
source§impl From<FloatColor> for OKLAB
impl From<FloatColor> for OKLAB
source§fn from(color: FloatColor) -> OKLAB
fn from(color: FloatColor) -> OKLAB
Converts to this type from the input type.
source§impl From<FloatColor> for OKLCH
impl From<FloatColor> for OKLCH
source§fn from(color: FloatColor) -> OKLCH
fn from(color: FloatColor) -> OKLCH
Converts to this type from the input type.
source§impl From<FloatColor> for P3
impl From<FloatColor> for P3
source§fn from(color: FloatColor) -> P3
fn from(color: FloatColor) -> P3
Converts to this type from the input type.
source§impl From<FloatColor> for ProPhoto
impl From<FloatColor> for ProPhoto
source§fn from(color: FloatColor) -> ProPhoto
fn from(color: FloatColor) -> ProPhoto
Converts to this type from the input type.
source§impl From<FloatColor> for RGBA
impl From<FloatColor> for RGBA
source§fn from(color: FloatColor) -> RGBA
fn from(color: FloatColor) -> RGBA
Converts to this type from the input type.
source§impl From<FloatColor> for Rec2020
impl From<FloatColor> for Rec2020
source§fn from(color: FloatColor) -> Rec2020
fn from(color: FloatColor) -> Rec2020
Converts to this type from the input type.
source§impl From<FloatColor> for SRGB
impl From<FloatColor> for SRGB
source§fn from(color: FloatColor) -> SRGB
fn from(color: FloatColor) -> SRGB
Converts to this type from the input type.
source§impl From<FloatColor> for SRGBLinear
impl From<FloatColor> for SRGBLinear
source§fn from(color: FloatColor) -> SRGBLinear
fn from(color: FloatColor) -> SRGBLinear
Converts to this type from the input type.
source§impl From<FloatColor> for XYZd50
impl From<FloatColor> for XYZd50
source§fn from(color: FloatColor) -> XYZd50
fn from(color: FloatColor) -> XYZd50
Converts to this type from the input type.
source§impl From<FloatColor> for XYZd65
impl From<FloatColor> for XYZd65
source§fn from(color: FloatColor) -> XYZd65
fn from(color: FloatColor) -> XYZd65
Converts to this type from the input type.
source§impl JsonSchema for FloatColor
impl JsonSchema for FloatColor
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moresource§impl PartialEq for FloatColor
impl PartialEq for FloatColor
source§impl Serialize for FloatColor
impl Serialize for FloatColor
source§impl<'i, __T: Visit<'i, __T, __V>, __V: ?Sized + Visitor<'i, __T>> Visit<'i, __T, __V> for FloatColor
impl<'i, __T: Visit<'i, __T, __V>, __V: ?Sized + Visitor<'i, __T>> Visit<'i, __T, __V> for FloatColor
source§const CHILD_TYPES: VisitTypes = _
const CHILD_TYPES: VisitTypes = _
Available on crate feature
visitor
only.The types of values contained within this value and its children.
This is used to skip branches that don’t have any values requested
by the Visitor.
impl Copy 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 UnwindSafe for FloatColor
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
)source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
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