Struct huelib::resource::light::StaticStateModifier [−][src]
pub struct StaticStateModifier {
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 effect: Option<Effect>,
pub transition_time: Option<u16>,
}
Expand description
Static modifier for the light state.
In comparison to StateModifier
, this modifier cannot increment/decrement any attributes or
change the alert effect.
This modifier is used in scene::Modifier
and scene::Creator
.
Fields
on: Option<bool>
Turns the light on or off.
brightness: Option<u8>
Sets the brightness of the light.
hue: Option<u16>
Sets the hue of the light.
saturation: Option<u8>
Sets the saturation of a light.
color_space_coordinates: Option<(f32, f32)>
Sets the color space coordinates of the light.
color_temperature: Option<u16>
Sets the color temperature of a light.
effect: Option<Effect>
Sets the dynamic effect of a light.
transition_time: Option<u16>
Sets the transition duration of state changes.
This is given as a multiple of 100ms.
Implementations
Sets the brightness
field of this struct.
Sets the saturation
field of this struct.
Sets the color_space_coordinates
field of this struct.
Sets the color_temperature
field of this struct.
Sets the effect
field of this struct.
Sets the transition_time
field of this struct.
Creates a new StaticStateModifier
.
Convenient method to set the color_space_coordinates
and brightness
fields.
Trait Implementations
Returns the “default value” for a type. 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
impl RefUnwindSafe for StaticStateModifier
impl Send for StaticStateModifier
impl Sync for StaticStateModifier
impl Unpin for StaticStateModifier
impl UnwindSafe for StaticStateModifier
Blanket Implementations
Mutably borrows from an owned value. Read more