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.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Auto Trait Implementations§
impl Freeze for ClientStateConnectorProxy
impl !RefUnwindSafe for ClientStateConnectorProxy
impl Send for ClientStateConnectorProxy
impl Sync for ClientStateConnectorProxy
impl Unpin for ClientStateConnectorProxy
impl !UnwindSafe for ClientStateConnectorProxy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)