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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.