pub struct ConnectorProxy { /* private fields */ }Implementations§
Source§impl ConnectorProxy
impl ConnectorProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.power.clientlevel/Connector.
Sourcepub fn take_event_stream(&self) -> ConnectorEventStream
pub fn take_event_stream(&self) -> ConnectorEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn connect(
&self,
client_type: ClientType,
watcher: ServerEnd<WatcherMarker>,
) -> Result<(), Error>
pub fn connect( &self, client_type: ClientType, watcher: ServerEnd<WatcherMarker>, ) -> Result<(), Error>
Connects a [Watcher] to the power level of the specified
ClientType.
A client may call this method and begin using the [Watcher] client
endpoint immediately.
If a power configuration does not exist for the provided client_type,
then the request will fail. On failure, both the watcher server
endpoint as well as the current Connector connection will be
terminated.
-
client_typespecifies to whichClientTypepower level thatwatchershould be connected. The value is valid iff a power configuration exists for the providedclient_type. -
watcheris the server endpoint of a [Watcher] channel that will be connected to theClientTypepower level.
Trait Implementations§
Source§impl Clone for ConnectorProxy
impl Clone for ConnectorProxy
Source§fn clone(&self) -> ConnectorProxy
fn clone(&self) -> ConnectorProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl ConnectorProxyInterface for ConnectorProxy
impl ConnectorProxyInterface for ConnectorProxy
fn connect( &self, client_type: ClientType, watcher: ServerEnd<WatcherMarker>, ) -> Result<(), Error>
Source§impl Debug for ConnectorProxy
impl Debug for ConnectorProxy
Source§impl Proxy for ConnectorProxy
impl Proxy for ConnectorProxy
Source§type Protocol = ConnectorMarker
type Protocol = ConnectorMarker
Proxy controls.