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 register_dependency_token(
&self,
token: Event,
) -> QueryResponseFut<ElementControlRegisterDependencyTokenResult, DefaultFuchsiaResourceDialect>
pub fn register_dependency_token( &self, token: Event, ) -> QueryResponseFut<ElementControlRegisterDependencyTokenResult, DefaultFuchsiaResourceDialect>
Register a token which will permit the bearer to add either a dependency upon this element.
Sourcepub fn unregister_dependency_token(
&self,
token: Event,
) -> QueryResponseFut<ElementControlUnregisterDependencyTokenResult, DefaultFuchsiaResourceDialect>
pub fn unregister_dependency_token( &self, token: Event, ) -> QueryResponseFut<ElementControlUnregisterDependencyTokenResult, DefaultFuchsiaResourceDialect>
Unregister a token previously registered via RegisterDependencyToken.
Sourcepub fn add_dependency(
&self,
dependent_level: u8,
requires_token: Event,
requires_level_by_preference: &[u8],
) -> QueryResponseFut<ElementControlAddDependencyResult, DefaultFuchsiaResourceDialect>
pub fn add_dependency( &self, dependent_level: u8, requires_token: Event, requires_level_by_preference: &[u8], ) -> QueryResponseFut<ElementControlAddDependencyResult, DefaultFuchsiaResourceDialect>
Add a new dependency to an existing element. If any open leases would incorporate this dependency, the required element and any transitively required elements must complete all necessary transitions (via ElementRunner.SetLevel calls) before this method will return.
Trait Implementations§
Source§impl Clone for ElementControlProxy
impl Clone for ElementControlProxy
Source§fn clone(&self) -> ElementControlProxy
fn clone(&self) -> ElementControlProxy
1.0.0 (const: unstable) · 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
type RegisterDependencyTokenResponseFut = QueryResponseFut<Result<(), RegisterDependencyTokenError>>
type UnregisterDependencyTokenResponseFut = QueryResponseFut<Result<(), UnregisterDependencyTokenError>>
type AddDependencyResponseFut = QueryResponseFut<Result<(), ModifyDependencyError>>
fn open_status_channel( &self, status_channel: ServerEnd<StatusMarker>, ) -> Result<(), Error>
fn register_dependency_token( &self, token: Event, ) -> Self::RegisterDependencyTokenResponseFut
fn unregister_dependency_token( &self, token: Event, ) -> Self::UnregisterDependencyTokenResponseFut
fn add_dependency( &self, dependent_level: u8, requires_token: Event, requires_level_by_preference: &[u8], ) -> Self::AddDependencyResponseFut
Source§impl Proxy for ElementControlProxy
impl Proxy for ElementControlProxy
Source§type Protocol = ElementControlMarker
type Protocol = ElementControlMarker
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
Source§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Source§fn on_closed(&self) -> OnSignals<'_, Unowned<'_, NullableHandle>>
fn on_closed(&self) -> OnSignals<'_, Unowned<'_, NullableHandle>>
PEER_CLOSED signal.