pub struct ElementControlProxy { /* private fields */ }
Implementations§
source§impl ElementControlProxy
impl ElementControlProxy
sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.power.broker/ElementControl.
sourcepub fn take_event_stream(&self) -> ElementControlEventStream
pub fn take_event_stream(&self) -> ElementControlEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
sourcepub fn open_status_channel(
&self,
status_channel: ServerEnd<StatusMarker>
) -> Result<(), Error>
pub fn open_status_channel( &self, status_channel: ServerEnd<StatusMarker> ) -> Result<(), Error>
Register a new Status channel on which Power Broker will send read-only updates of the element’s current power level. This method is intended to allow element owners to give read-only access to the element’s current power level to clients by opening and transferring this channel.
sourcepub fn add_dependency(
&self,
dependency_type: DependencyType,
dependent_level: u8,
requires_token: Event,
requires_level: u8
) -> QueryResponseFut<ElementControlAddDependencyResult>
pub fn add_dependency( &self, dependency_type: DependencyType, dependent_level: u8, requires_token: Event, requires_level: u8 ) -> QueryResponseFut<ElementControlAddDependencyResult>
Adds an active or passive dependency of this element upon another element.
sourcepub fn remove_dependency(
&self,
dependency_type: DependencyType,
dependent_level: u8,
requires_token: Event,
requires_level: u8
) -> QueryResponseFut<ElementControlRemoveDependencyResult>
pub fn remove_dependency( &self, dependency_type: DependencyType, dependent_level: u8, requires_token: Event, requires_level: u8 ) -> QueryResponseFut<ElementControlRemoveDependencyResult>
Removes an active or passive dependency of this element upon another element.
sourcepub fn register_dependency_token(
&self,
token: Event,
dependency_type: DependencyType
) -> QueryResponseFut<ElementControlRegisterDependencyTokenResult>
pub fn register_dependency_token( &self, token: Event, dependency_type: DependencyType ) -> QueryResponseFut<ElementControlRegisterDependencyTokenResult>
Register a token which will permit the bearer to add either an active or passive dependency upon this element, depending on the dependency_type specified.
sourcepub fn unregister_dependency_token(
&self,
token: Event
) -> QueryResponseFut<ElementControlUnregisterDependencyTokenResult>
pub fn unregister_dependency_token( &self, token: Event ) -> QueryResponseFut<ElementControlUnregisterDependencyTokenResult>
Unregister a token previously registered via RegisterDependencyToken.
Trait Implementations§
source§impl Clone for ElementControlProxy
impl Clone for ElementControlProxy
source§fn clone(&self) -> ElementControlProxy
fn clone(&self) -> ElementControlProxy
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ElementControlProxy
impl Debug for ElementControlProxy
source§impl ElementControlProxyInterface for ElementControlProxy
impl ElementControlProxyInterface for ElementControlProxy
fn open_status_channel( &self, status_channel: ServerEnd<StatusMarker> ) -> Result<(), Error>
type AddDependencyResponseFut = QueryResponseFut<Result<(), ModifyDependencyError>>
fn add_dependency( &self, dependency_type: DependencyType, dependent_level: u8, requires_token: Event, requires_level: u8 ) -> Self::AddDependencyResponseFut
type RemoveDependencyResponseFut = QueryResponseFut<Result<(), ModifyDependencyError>>
fn remove_dependency( &self, dependency_type: DependencyType, dependent_level: u8, requires_token: Event, requires_level: u8 ) -> Self::RemoveDependencyResponseFut
type RegisterDependencyTokenResponseFut = QueryResponseFut<Result<(), RegisterDependencyTokenError>>
fn register_dependency_token( &self, token: Event, dependency_type: DependencyType ) -> Self::RegisterDependencyTokenResponseFut
type UnregisterDependencyTokenResponseFut = QueryResponseFut<Result<(), UnregisterDependencyTokenError>>
fn unregister_dependency_token( &self, token: Event ) -> Self::UnregisterDependencyTokenResponseFut
source§impl Proxy for ElementControlProxy
impl Proxy for ElementControlProxy
§type Protocol = ElementControlMarker
type Protocol = ElementControlMarker
Proxy
controls.