pub enum PredefinedColor {
SRGB(SRGB),
SRGBLinear(SRGBLinear),
DisplayP3(P3),
A98(A98),
ProPhoto(ProPhoto),
Rec2020(Rec2020),
XYZd50(XYZd50),
XYZd65(XYZd65),
}
Expand description
A color in a predefined color space, e.g. display-p3
.
Variants§
SRGB(SRGB)
A color in the srgb
color space.
SRGBLinear(SRGBLinear)
A color in the srgb-linear
color space.
DisplayP3(P3)
A color in the display-p3
color space.
A98(A98)
A color in the a98-rgb
color space.
ProPhoto(ProPhoto)
A color in the prophoto-rgb
color space.
Rec2020(Rec2020)
A color in the rec2020
color space.
XYZd50(XYZd50)
A color in the xyz-d50
color space.
XYZd65(XYZd65)
A color in the xyz-d65
color space.
Trait Implementations§
Source§impl Clone for PredefinedColor
impl Clone for PredefinedColor
Source§fn clone(&self) -> PredefinedColor
fn clone(&self) -> PredefinedColor
Returns a duplicate 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 PredefinedColor
impl Debug for PredefinedColor
Source§impl<'de> Deserialize<'de> for PredefinedColor
impl<'de> Deserialize<'de> for PredefinedColor
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<A98> for PredefinedColor
impl From<A98> for PredefinedColor
Source§fn from(color: A98) -> PredefinedColor
fn from(color: A98) -> PredefinedColor
Converts to this type from the input type.
Source§impl From<P3> for PredefinedColor
impl From<P3> for PredefinedColor
Source§fn from(color: P3) -> PredefinedColor
fn from(color: P3) -> PredefinedColor
Converts to this type from the input type.
Source§impl From<PredefinedColor> for A98
impl From<PredefinedColor> for A98
Source§fn from(color: PredefinedColor) -> A98
fn from(color: PredefinedColor) -> A98
Converts to this type from the input type.
Source§impl From<PredefinedColor> for HSL
impl From<PredefinedColor> for HSL
Source§fn from(color: PredefinedColor) -> HSL
fn from(color: PredefinedColor) -> HSL
Converts to this type from the input type.
Source§impl From<PredefinedColor> for HWB
impl From<PredefinedColor> for HWB
Source§fn from(color: PredefinedColor) -> HWB
fn from(color: PredefinedColor) -> HWB
Converts to this type from the input type.
Source§impl From<PredefinedColor> for LAB
impl From<PredefinedColor> for LAB
Source§fn from(color: PredefinedColor) -> LAB
fn from(color: PredefinedColor) -> LAB
Converts to this type from the input type.
Source§impl From<PredefinedColor> for LCH
impl From<PredefinedColor> for LCH
Source§fn from(color: PredefinedColor) -> LCH
fn from(color: PredefinedColor) -> LCH
Converts to this type from the input type.
Source§impl From<PredefinedColor> for OKLAB
impl From<PredefinedColor> for OKLAB
Source§fn from(color: PredefinedColor) -> OKLAB
fn from(color: PredefinedColor) -> OKLAB
Converts to this type from the input type.
Source§impl From<PredefinedColor> for OKLCH
impl From<PredefinedColor> for OKLCH
Source§fn from(color: PredefinedColor) -> OKLCH
fn from(color: PredefinedColor) -> OKLCH
Converts to this type from the input type.
Source§impl From<PredefinedColor> for P3
impl From<PredefinedColor> for P3
Source§fn from(color: PredefinedColor) -> P3
fn from(color: PredefinedColor) -> P3
Converts to this type from the input type.
Source§impl From<PredefinedColor> for ProPhoto
impl From<PredefinedColor> for ProPhoto
Source§fn from(color: PredefinedColor) -> ProPhoto
fn from(color: PredefinedColor) -> ProPhoto
Converts to this type from the input type.
Source§impl From<PredefinedColor> for RGBA
impl From<PredefinedColor> for RGBA
Source§fn from(color: PredefinedColor) -> RGBA
fn from(color: PredefinedColor) -> RGBA
Converts to this type from the input type.
Source§impl From<PredefinedColor> for Rec2020
impl From<PredefinedColor> for Rec2020
Source§fn from(color: PredefinedColor) -> Rec2020
fn from(color: PredefinedColor) -> Rec2020
Converts to this type from the input type.
Source§impl From<PredefinedColor> for SRGB
impl From<PredefinedColor> for SRGB
Source§fn from(color: PredefinedColor) -> SRGB
fn from(color: PredefinedColor) -> SRGB
Converts to this type from the input type.
Source§impl From<PredefinedColor> for SRGBLinear
impl From<PredefinedColor> for SRGBLinear
Source§fn from(color: PredefinedColor) -> SRGBLinear
fn from(color: PredefinedColor) -> SRGBLinear
Converts to this type from the input type.
Source§impl From<PredefinedColor> for XYZd50
impl From<PredefinedColor> for XYZd50
Source§fn from(color: PredefinedColor) -> XYZd50
fn from(color: PredefinedColor) -> XYZd50
Converts to this type from the input type.
Source§impl From<PredefinedColor> for XYZd65
impl From<PredefinedColor> for XYZd65
Source§fn from(color: PredefinedColor) -> XYZd65
fn from(color: PredefinedColor) -> XYZd65
Converts to this type from the input type.
Source§impl From<ProPhoto> for PredefinedColor
impl From<ProPhoto> for PredefinedColor
Source§fn from(color: ProPhoto) -> PredefinedColor
fn from(color: ProPhoto) -> PredefinedColor
Converts to this type from the input type.
Source§impl From<Rec2020> for PredefinedColor
impl From<Rec2020> for PredefinedColor
Source§fn from(color: Rec2020) -> PredefinedColor
fn from(color: Rec2020) -> PredefinedColor
Converts to this type from the input type.
Source§impl From<SRGBLinear> for PredefinedColor
impl From<SRGBLinear> for PredefinedColor
Source§fn from(color: SRGBLinear) -> PredefinedColor
fn from(color: SRGBLinear) -> PredefinedColor
Converts to this type from the input type.
Source§impl From<XYZd50> for PredefinedColor
impl From<XYZd50> for PredefinedColor
Source§fn from(color: XYZd50) -> PredefinedColor
fn from(color: XYZd50) -> PredefinedColor
Converts to this type from the input type.
Source§impl From<XYZd65> for PredefinedColor
impl From<XYZd65> for PredefinedColor
Source§fn from(color: XYZd65) -> PredefinedColor
fn from(color: XYZd65) -> PredefinedColor
Converts to this type from the input type.
Source§impl JsonSchema for PredefinedColor
impl JsonSchema for PredefinedColor
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(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &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 PredefinedColor
impl PartialEq for PredefinedColor
Source§impl Serialize for PredefinedColor
impl Serialize for PredefinedColor
Source§impl<'i, __T: Visit<'i, __T, __V>, __V: ?Sized + Visitor<'i, __T>> Visit<'i, __T, __V> for PredefinedColor
impl<'i, __T: Visit<'i, __T, __V>, __V: ?Sized + Visitor<'i, __T>> Visit<'i, __T, __V> for PredefinedColor
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 PredefinedColor
impl StructuralPartialEq for PredefinedColor
Auto Trait Implementations§
impl Freeze for PredefinedColor
impl RefUnwindSafe for PredefinedColor
impl Send for PredefinedColor
impl Sync for PredefinedColor
impl Unpin for PredefinedColor
impl UnwindSafe for PredefinedColor
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§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