Struct fidl_fuchsia_settings::LightProxy
source · pub struct LightProxy { /* private fields */ }
Implementations§
source§impl LightProxy
impl LightProxy
sourcepub fn take_event_stream(&self) -> LightEventStream
pub fn take_event_stream(&self) -> LightEventStream
Get a Stream of events from the remote end of the Light protocol
Panics
Panics if the event stream was already taken.
sourcepub fn watch_light_groups(&self) -> QueryResponseFut<Vec<LightGroup>>
pub fn watch_light_groups(&self) -> QueryResponseFut<Vec<LightGroup>>
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) -> QueryResponseFut<LightGroup>
pub fn watch_light_group(&self, name: &str) -> QueryResponseFut<LightGroup>
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: &mut dyn ExactSizeIterator<Item = LightState>
) -> QueryResponseFut<LightSetLightGroupValuesResult>
pub fn set_light_group_values( &self, name: &str, state: &mut dyn ExactSizeIterator<Item = LightState> ) -> QueryResponseFut<LightSetLightGroupValuesResult>
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 Clone for LightProxy
impl Clone for LightProxy
source§fn clone(&self) -> LightProxy
fn clone(&self) -> LightProxy
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for LightProxy
impl Debug for LightProxy
source§impl LightProxyInterface for LightProxy
impl LightProxyInterface for LightProxy
type WatchLightGroupsResponseFut = QueryResponseFut<Vec<LightGroup, Global>>
fn watch_light_groups(&self) -> Self::WatchLightGroupsResponseFut
type WatchLightGroupResponseFut = QueryResponseFut<LightGroup>
fn watch_light_group(&self, name: &str) -> Self::WatchLightGroupResponseFut
type SetLightGroupValuesResponseFut = QueryResponseFut<Result<(), LightError>>
fn set_light_group_values( &self, name: &str, state: &mut dyn ExactSizeIterator<Item = LightState> ) -> Self::SetLightGroupValuesResponseFut
source§impl Proxy for LightProxy
impl Proxy for LightProxy
§type Protocol = LightMarker
type Protocol = LightMarker
Proxy
controls.