pub trait ColorSpace:
Sized
+ Copy
+ Clone
+ PartialEq {
const MODE: &'static str;
const CHANNELS: &'static [&'static str];
// Required methods
fn alpha(&self) -> Option<f64>;
fn with_alpha(self, alpha: Option<f64>) -> Self;
fn to_xyz65(&self) -> Xyz65;
fn from_xyz65(xyz: Xyz65) -> Self;
}Expand description
A color space: a fixed set of channels with conversions to and from the XYZ D65 hub.
Required Associated Constants§
Required Methods§
Sourcefn with_alpha(self, alpha: Option<f64>) -> Self
fn with_alpha(self, alpha: Option<f64>) -> Self
Returns a copy of self with the given alpha.
Sourcefn from_xyz65(xyz: Xyz65) -> Self
fn from_xyz65(xyz: Xyz65) -> Self
Construct a color of this space from the XYZ D65 hub space.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.