Trait andiskaz::color::ApproxBrightness
source · pub trait ApproxBrightness {
// Required methods
fn approx_brightness(&self) -> Brightness;
fn set_approx_brightness(&mut self, brightness: Brightness);
// Provided method
fn with_approx_brightness(self, brightness: Brightness) -> Self
where Self: Sized { ... }
}
Expand description
A trait for types that can approximate their brightness.
Required Methods§
sourcefn approx_brightness(&self) -> Brightness
fn approx_brightness(&self) -> Brightness
Approximate the brightness of the color.
sourcefn set_approx_brightness(&mut self, brightness: Brightness)
fn set_approx_brightness(&mut self, brightness: Brightness)
Set the approximate brightness of the color.
Provided Methods§
sourcefn with_approx_brightness(self, brightness: Brightness) -> Selfwhere
Self: Sized,
fn with_approx_brightness(self, brightness: Brightness) -> Selfwhere Self: Sized,
Like Self::set_approx_brightness
but takes and returns self
instead of mutating it.