Struct huelib::resource::light::State [−][src]
pub struct State {
pub on: Option<bool>,
pub brightness: Option<u8>,
pub hue: Option<u16>,
pub saturation: Option<u8>,
pub color_space_coordinates: Option<(f32, f32)>,
pub color_temperature: Option<u16>,
pub alert: Option<Alert>,
pub effect: Option<Effect>,
pub color_mode: Option<ColorMode>,
pub reachable: bool,
}
Expand description
State of a light.
Fields
on: Option<bool>
Whether the light is on.
brightness: Option<u8>
Brightness of the light.
The maximum brightness is 254 and 1 is the minimum brightness.
hue: Option<u16>
Hue of the light.
Both 0 and 65535 are red, 25500 is green and 46920 is blue.
saturation: Option<u8>
Saturation of the light.
The most saturated (colored) is 254 and 0 is the least saturated (white).
color_space_coordinates: Option<(f32, f32)>
X and y coordinates of a color in CIE color space. Both values must be between 0 and 1.
color_temperature: Option<u16>
Mired color temperature of the light.
alert: Option<Alert>
Alert effect of the light.
effect: Option<Effect>
Dynamic effect of the light.
color_mode: Option<ColorMode>
Color mode of the light.
reachable: bool
Whether the light can be reached by the bridge.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for State
impl UnwindSafe for State
Blanket Implementations
Mutably borrows from an owned value. Read more