pub struct ClientStateConnectorProxy { /* private fields */ }
Implementations§
Source§impl ClientStateConnectorProxy
impl ClientStateConnectorProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.thermal/ClientStateConnector.
Sourcepub fn take_event_stream(&self) -> ClientStateConnectorEventStream
pub fn take_event_stream(&self) -> ClientStateConnectorEventStream
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: &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 Clone for ClientStateConnectorProxy
impl Clone for ClientStateConnectorProxy
Source§fn clone(&self) -> ClientStateConnectorProxy
fn clone(&self) -> ClientStateConnectorProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for ClientStateConnectorProxy
impl Debug for ClientStateConnectorProxy
Source§impl Proxy for ClientStateConnectorProxy
impl Proxy for ClientStateConnectorProxy
Source§type Protocol = ClientStateConnectorMarker
type Protocol = ClientStateConnectorMarker
Proxy
controls.