pub struct Brightness { /* private fields */ }
Implementations§
Source§impl Brightness
impl Brightness
pub const MIN: Self
pub const MAX: Self
pub const fn new(level: BrightnessLevel) -> Self
pub const fn level(self) -> BrightnessLevel
pub fn with_level<F>(self, mapper: F) -> Self
pub fn spread_level( self, soft_max: BrightnessLevel, ) -> Result<Self, BrightnessError>
pub fn spread(self, soft_max: Self) -> Result<Self, BrightnessError>
pub fn compress_level( self, soft_max: BrightnessLevel, ) -> Result<Self, BrightnessError>
pub fn compress(self, soft_max: Self) -> Result<Self, BrightnessError>
pub fn adapt_to(self, reference_brightness: Self) -> Self
pub fn contrast_to(self, reference_brightness: Self) -> Self
Trait Implementations§
Source§impl ApproxBrightness for Brightness
impl ApproxBrightness for Brightness
fn approx_brightness(&self) -> Result<Brightness, BrightnessError>
Source§impl Clone for Brightness
impl Clone for Brightness
Source§fn clone(&self) -> Brightness
fn clone(&self) -> Brightness
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Brightness
impl Debug for Brightness
Source§impl Default for Brightness
impl Default for Brightness
Source§impl Hash for Brightness
impl Hash for Brightness
Source§impl Mutable for Brightness
impl Mutable for Brightness
type Error = BrightnessError
Source§impl MutableApproxBrightness for Brightness
impl MutableApproxBrightness for Brightness
fn set_approx_brightness( &mut self, brightness: Brightness, ) -> Result<(), BrightnessError>
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,
Source§impl Mutation<Brightness> for AdaptTo
impl Mutation<Brightness> for AdaptTo
fn mutate( self, target: Brightness, ) -> Result<Brightness, <Brightness as Mutable>::Error>
Source§impl Mutation<Brightness> for ContrastTo
impl Mutation<Brightness> for ContrastTo
fn mutate( self, target: Brightness, ) -> Result<Brightness, <Brightness as Mutable>::Error>
Source§impl Ord for Brightness
impl Ord for Brightness
Source§fn cmp(&self, other: &Brightness) -> Ordering
fn cmp(&self, other: &Brightness) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for Brightness
impl PartialEq for Brightness
Source§impl PartialOrd for Brightness
impl PartialOrd for Brightness
impl Copy for Brightness
impl Eq for Brightness
impl StructuralPartialEq for Brightness
Auto Trait Implementations§
impl Freeze for Brightness
impl RefUnwindSafe for Brightness
impl Send for Brightness
impl Sync for Brightness
impl Unpin for Brightness
impl UnwindSafe for Brightness
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more