pub trait Limited {
// Required methods
fn is_valid(&self) -> bool;
fn clamp(&self) -> Self;
fn clamp_self(&mut self);
}
Expand description
A trait for clamping and checking if colors are within their ranges.
Required Methods§
sourcefn clamp(&self) -> Self
fn clamp(&self) -> Self
Return a new color where the components has been clamped to the nearest valid values.
sourcefn clamp_self(&mut self)
fn clamp_self(&mut self)
Clamp the color’s components to the nearest valid values.
Object Safety§
This trait is not object safe.