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§
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,
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.