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
§type Protocol = ClientStateConnectorMarker
type Protocol = ClientStateConnectorMarker
Proxy
controls.