Trait MutableApproxBrightness

Source
pub trait MutableApproxBrightness: ApproxBrightness {
    // Required method
    fn set_approx_brightness(
        &mut self,
        brightness: Brightness,
    ) -> Result<(), BrightnessError>;

    // Provided methods
    fn with_approx_brightness(
        self,
        brightness: Brightness,
    ) -> Result<Self, BrightnessError>
       where Self: Sized { ... }
    fn set_adapt_to<A>(&mut self, other: A) -> Result<(), BrightnessError>
       where A: ApproxBrightness { ... }
    fn with_adapt_to<A>(self, other: A) -> Result<Self, BrightnessError>
       where Self: Sized,
             A: ApproxBrightness { ... }
    fn set_contrast_to<A>(&mut self, other: A) -> Result<(), BrightnessError>
       where A: ApproxBrightness { ... }
    fn with_contrast_to<A>(self, other: A) -> Result<Self, BrightnessError>
       where Self: Sized,
             A: ApproxBrightness { ... }
}

Required Methods§

Provided Methods§

Source

fn with_approx_brightness( self, brightness: Brightness, ) -> Result<Self, BrightnessError>
where Self: Sized,

Source

fn set_adapt_to<A>(&mut self, other: A) -> Result<(), BrightnessError>

Source

fn with_adapt_to<A>(self, other: A) -> Result<Self, BrightnessError>
where Self: Sized, A: ApproxBrightness,

Source

fn set_contrast_to<A>(&mut self, other: A) -> Result<(), BrightnessError>

Source

fn with_contrast_to<A>(self, other: A) -> Result<Self, BrightnessError>
where Self: Sized, A: ApproxBrightness,

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.

Implementations on Foreign Types§

Source§

impl<'a, A> MutableApproxBrightness for &'a mut A

Source§

impl<A> MutableApproxBrightness for Box<A>

Implementors§