pub trait ColorFunction {
type Color;
// Required methods
fn size(&self) -> usize;
fn get(&self, index: usize) -> Self::Color;
}Expand description
Trait for color lookup functions used by span_gradient.
Provides indexed access to a color palette of known size.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".