pub trait ProtoColor: Sized {
// Required methods
fn hue(&self) -> OklabHue;
fn saturation(&self) -> Option<ZeroToOne>;
// Provided method
fn into_source(
self,
saturation_if_not_provided: impl Into<ZeroToOne>,
) -> ColorSource { ... }
}
Expand description
A type that can be interpretted as a hue or hue and saturation.
Required Methods§
Sourcefn saturation(&self) -> Option<ZeroToOne>
fn saturation(&self) -> Option<ZeroToOne>
Returns the saturation of this prototype color, if available.
Provided Methods§
Sourcefn into_source(
self,
saturation_if_not_provided: impl Into<ZeroToOne>,
) -> ColorSource
fn into_source( self, saturation_if_not_provided: impl Into<ZeroToOne>, ) -> ColorSource
Returns a color source built from this prototype color
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.