Dimmer

Trait Dimmer 

Source
pub trait Dimmer: Light {
    // Provided methods
    fn brightness(&self) -> Result<u16> { ... }
    fn set_brightness(&self, brightness: u16) -> Result<()> { ... }
}
Expand description

Dimmable smart light devices

Provided Methods§

Source

fn brightness(&self) -> Result<u16>

Get percentage brightness of bulb

Source

fn set_brightness(&self, brightness: u16) -> Result<()>

Set percentage brightness of bulb

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.

Implementors§

Source§

impl<T: Protocol> Dimmer for KL110<T>

Source§

impl<T: Protocol> Dimmer for LB110<T>

Source§

impl<T: Protocol> Dimmer for LB120<T>