pub trait ColorSpace {
// Required methods
fn components(&self) -> (f32, f32, f32, f32);
fn channels(&self) -> (&'static str, &'static str, &'static str);
fn types(&self) -> (ChannelType, ChannelType, ChannelType);
fn resolve_missing(&self) -> Self;
fn resolve(&self) -> Self;
}
Expand description
A trait for color spaces.
Required Methods§
Sourcefn channels(&self) -> (&'static str, &'static str, &'static str)
fn channels(&self) -> (&'static str, &'static str, &'static str)
Returns the channel names for this color space.
Sourcefn types(&self) -> (ChannelType, ChannelType, ChannelType)
fn types(&self) -> (ChannelType, ChannelType, ChannelType)
Returns the channel types for this color space.
Sourcefn resolve_missing(&self) -> Self
fn resolve_missing(&self) -> Self
Resolves missing color components (e.g. none
keywords) in the 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.