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 protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn watch_light_groups(
&self,
) -> QueryResponseFut<Vec<LightGroup>, DefaultFuchsiaResourceDialect>
pub fn watch_light_groups( &self, ) -> QueryResponseFut<Vec<LightGroup>, DefaultFuchsiaResourceDialect>
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, DefaultFuchsiaResourceDialect>
pub fn watch_light_group( &self, name: &str, ) -> QueryResponseFut<LightGroup, DefaultFuchsiaResourceDialect>
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],
) -> QueryResponseFut<LightSetLightGroupValuesResult, DefaultFuchsiaResourceDialect>
pub fn set_light_group_values( &self, name: &str, state: &[LightState], ) -> QueryResponseFut<LightSetLightGroupValuesResult, DefaultFuchsiaResourceDialect>
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>>
type WatchLightGroupResponseFut = QueryResponseFut<LightGroup>
type SetLightGroupValuesResponseFut = QueryResponseFut<Result<(), LightError>>
fn watch_light_groups(&self) -> Self::WatchLightGroupsResponseFut
fn watch_light_group(&self, name: &str) -> Self::WatchLightGroupResponseFut
fn set_light_group_values( &self, name: &str, state: &[LightState], ) -> Self::SetLightGroupValuesResponseFut
Source§impl Proxy for LightProxy
impl Proxy for LightProxy
Source§type Protocol = LightMarker
type Protocol = LightMarker
Proxy
controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Auto Trait Implementations§
impl Freeze for LightProxy
impl !RefUnwindSafe for LightProxy
impl Send for LightProxy
impl Sync for LightProxy
impl Unpin for LightProxy
impl !UnwindSafe for LightProxy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)