Struct huelib::resource::group::StateModifier[][src]

pub struct StateModifier {
    pub on: Option<bool>,
    pub brightness: Option<Adjust<u8>>,
    pub hue: Option<Adjust<u16>>,
    pub saturation: Option<Adjust<u8>>,
    pub color_space_coordinates: Option<Adjust<(f32, f32)>>,
    pub color_temperature: Option<Adjust<u16>>,
    pub alert: Option<Alert>,
    pub effect: Option<Effect>,
    pub transition_time: Option<u16>,
    pub scene: Option<String>,
}
Expand description

Struct for modifying the group state.

Fields

on: Option<bool>

Turns the lights on or off.

brightness: Option<Adjust<u8>>

Sets the brightness of the lights.

hue: Option<Adjust<u16>>

Sets the hue of the lights.

saturation: Option<Adjust<u8>>

Sets the saturation of the lights.

color_space_coordinates: Option<Adjust<(f32, f32)>>

Sets the color space coordinates of the lights.

color_temperature: Option<Adjust<u16>>

Sets the color temperature of the lights.

alert: Option<Alert>

Sets the alert effect of the lights.

effect: Option<Effect>

Sets the dynamic effect of the lights.

transition_time: Option<u16>

Sets the transition duration of state changes.

This is given as a multiple of 100ms.

scene: Option<String>

Sets the scene identifier of the group.

Implementations

Sets the on field of this struct.

Sets the brightness field of this struct.

Sets the hue 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 alert field of this struct.

Sets the effect field of this struct.

Sets the transition_time field of this struct.

Sets the scene field of this struct.

Creates a new StateModifier.

Convenient method to set the color_space_coordinates and brightness fields.

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

Returns the “default value” for a type. Read more

The type of the identifier. Read more

Returns the suffix of the API URL.

Sends the request to modify the resource.

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

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

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.