pub enum LightRequest {
WatchLightGroups {
responder: LightWatchLightGroupsResponder,
},
WatchLightGroup {
name: String,
responder: LightWatchLightGroupResponder,
},
SetLightGroupValues {
name: String,
state: Vec<LightState>,
responder: LightSetLightGroupValuesResponder,
},
}
Variants§
WatchLightGroups
Fetches information on the controllable light groups on the device. Returns immediately on first call; subsequent calls return when the value changes.
If this call fails, it is considered a fatal error and the channel will be closed.
Fields
responder: LightWatchLightGroupsResponder
WatchLightGroup
Fetches information on an individual light group on the device with the given name. Returns immediately on first call; subsequent calls return when the value changes.
If this call fails, it is considered a fatal error and the channel will be closed. If the failure is due to an invalid light group name, the channel will be closed with a NOT_FOUND epitaph.
SetLightGroupValues
Sets the values for the lights in the group with the given name.
If the provided value does not match the light group’s type, this call will fail.
The requested changes may not take immediate effect if the light is forced to a certain state by the device’s hardware. This call will still succeed, but the light’s value may not change.
Implementations§
source§impl LightRequest
impl LightRequest
pub fn into_watch_light_groups(self) -> Option<LightWatchLightGroupsResponder>
pub fn into_watch_light_group( self, ) -> Option<(String, LightWatchLightGroupResponder)>
pub fn into_set_light_group_values( self, ) -> Option<(String, Vec<LightState>, LightSetLightGroupValuesResponder)>
sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL