[−][src]Struct huelib::resource::group::StateModifier
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
impl StateModifier
[src]
pub fn with_on(self, value: bool) -> Self
[src]
Sets the on
field of this struct.
pub fn with_brightness(self, value: Adjust<u8>) -> Self
[src]
Sets the brightness
field of this struct.
pub fn with_hue(self, value: Adjust<u16>) -> Self
[src]
Sets the hue
field of this struct.
pub fn with_saturation(self, value: Adjust<u8>) -> Self
[src]
Sets the saturation
field of this struct.
pub fn with_color_space_coordinates(self, value: Adjust<(f32, f32)>) -> Self
[src]
Sets the color_space_coordinates
field of this struct.
pub fn with_color_temperature(self, value: Adjust<u16>) -> Self
[src]
Sets the color_temperature
field of this struct.
pub fn with_alert(self, value: Alert) -> Self
[src]
Sets the alert
field of this struct.
pub fn with_effect(self, value: Effect) -> Self
[src]
Sets the effect
field of this struct.
pub fn with_transition_time(self, value: u16) -> Self
[src]
Sets the transition_time
field of this struct.
pub fn with_scene(self, value: String) -> Self
[src]
Sets the scene
field of this struct.
impl StateModifier
[src]
pub fn new() -> Self
[src]
Creates a new StateModifier
.
pub fn with_color(self, value: Color) -> Self
[src]
Convenient method to set the color_space_coordinates
and brightness
fields.
Trait Implementations
impl Clone for StateModifier
[src]
pub fn clone(&self) -> StateModifier
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for StateModifier
[src]
impl Default for StateModifier
[src]
pub fn default() -> StateModifier
[src]
impl Modifier for StateModifier
[src]
type Id = String
The type of the identifier. Read more
pub fn url_suffix(id: Self::Id) -> String
[src]
pub fn execute(
&self,
bridge: &Bridge,
id: Self::Id
) -> Result<Vec<Response<Modified>>>
[src]
&self,
bridge: &Bridge,
id: Self::Id
) -> Result<Vec<Response<Modified>>>
impl PartialEq<StateModifier> for StateModifier
[src]
pub fn eq(&self, other: &StateModifier) -> bool
[src]
pub fn ne(&self, other: &StateModifier) -> bool
[src]
impl Serialize for StateModifier
[src]
impl StructuralPartialEq for StateModifier
[src]
Auto Trait Implementations
impl RefUnwindSafe for StateModifier
[src]
impl Send for StateModifier
[src]
impl Sync for StateModifier
[src]
impl Unpin for StateModifier
[src]
impl UnwindSafe for StateModifier
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,