pub struct ClientStateConnectorSynchronousProxy { /* private fields */ }
Implementations§
Source§impl ClientStateConnectorSynchronousProxy
impl ClientStateConnectorSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<ClientStateConnectorEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<ClientStateConnectorEvent, 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: &str,
watcher: ServerEnd<ClientStateWatcherMarker>,
) -> Result<(), Error>
pub fn connect( &self, client_type: &str, watcher: ServerEnd<ClientStateWatcherMarker>, ) -> Result<(), Error>
Connects a [ClientStateWatcher
] to the thermal state of the specified
ClientType
.
A client may call this method and begin using the [ClientStateWatcher
]
client endpoint immediately.
If client_type
does not exactly (case-sensitive) match with a client
entry found in the central thermal configuration, then the request will
fail. On failure, both the watcher
server endpoint as well as the
current ClientStateConnector
connection will be terminated.
-
client_type
specifies the client-specific thermal state to whichwatcher
should be connected. The value is valid iff it matches with a client entry found in the central thermal configuration. -
watcher
is the server endpoint of a [ClientStateWatcher
] channel that will be connected to the thermal state ofclient_type
.
Trait Implementations§
Source§impl SynchronousProxy for ClientStateConnectorSynchronousProxy
impl SynchronousProxy for ClientStateConnectorSynchronousProxy
Source§type Proxy = ClientStateConnectorProxy
type Proxy = ClientStateConnectorProxy
Source§type Protocol = ClientStateConnectorMarker
type Protocol = ClientStateConnectorMarker
Proxy
controls.