pub trait Component: Copy + Zero + PartialOrd + NumCast {
const LIMITED: bool;
// Required methods
fn max_intensity() -> Self;
fn convert<T: Component>(&self) -> T;
}
Expand description
Common trait for color components.
Required Associated Constants§
Required Methods§
sourcefn max_intensity() -> Self
fn max_intensity() -> Self
The highest displayable value this component type can reach. Higher values are allowed, but they may be lowered to this before converting to another format.
Object Safety§
This trait is not object safe.