pub struct ConnectorSynchronousProxy { /* private fields */ }
Implementations§
Source§impl ConnectorSynchronousProxy
impl ConnectorSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<ConnectorEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<ConnectorEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
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_type
specifies to whichClientType
power level thatwatcher
should be connected. The value is valid iff a power configuration exists for the providedclient_type
. -
watcher
is the server endpoint of a [Watcher
] channel that will be connected to theClientType
power level.
Trait Implementations§
Source§impl Debug for ConnectorSynchronousProxy
impl Debug for ConnectorSynchronousProxy
Source§impl SynchronousProxy for ConnectorSynchronousProxy
impl SynchronousProxy for ConnectorSynchronousProxy
Source§type Proxy = ConnectorProxy
type Proxy = ConnectorProxy
Source§type Protocol = ConnectorMarker
type Protocol = ConnectorMarker
Proxy
controls.