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§

source

fn approx_brightness(&self) -> Brightness

Approximate the brightness of the color.

source

fn set_approx_brightness(&mut self, brightness: Brightness)

Set the approximate brightness of the color.

Provided Methods§

source

fn with_approx_brightness(self, brightness: Brightness) -> Selfwhere Self: Sized,

Like Self::set_approx_brightness but takes and returns self instead of mutating it.

Implementors§