pub trait ColorComponent: Copy {
const ZERO: Self;
const HALF: Self;
const MAX: Self;
// Required methods
fn as_f32(self) -> f32;
fn from_f32(value: f32) -> Self;
// Provided method
fn convert<U>(self) -> U
where U: ColorComponent { ... }
}
Required Associated Constants§
Required Methods§
Provided Methods§
fn convert<U>(self) -> Uwhere
U: ColorComponent,
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.