pub struct LightSynchronousProxy { /* private fields */ }
Implementations§
Source§impl LightSynchronousProxy
impl LightSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<LightEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<LightEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn watch_light_groups(
&self,
___deadline: MonotonicInstant,
) -> Result<Vec<LightGroup>, Error>
pub fn watch_light_groups( &self, ___deadline: MonotonicInstant, ) -> Result<Vec<LightGroup>, Error>
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.
Sourcepub fn watch_light_group(
&self,
name: &str,
___deadline: MonotonicInstant,
) -> Result<LightGroup, Error>
pub fn watch_light_group( &self, name: &str, ___deadline: MonotonicInstant, ) -> Result<LightGroup, Error>
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.
Sourcepub fn set_light_group_values(
&self,
name: &str,
state: &[LightState],
___deadline: MonotonicInstant,
) -> Result<LightSetLightGroupValuesResult, Error>
pub fn set_light_group_values( &self, name: &str, state: &[LightState], ___deadline: MonotonicInstant, ) -> Result<LightSetLightGroupValuesResult, Error>
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.
Trait Implementations§
Source§impl Debug for LightSynchronousProxy
impl Debug for LightSynchronousProxy
Source§impl SynchronousProxy for LightSynchronousProxy
impl SynchronousProxy for LightSynchronousProxy
Source§type Proxy = LightProxy
type Proxy = LightProxy
Source§type Protocol = LightMarker
type Protocol = LightMarker
Proxy
controls.