pub struct ShutdownWatcherRegisterProxy { /* private fields */ }Implementations§
Source§impl ShutdownWatcherRegisterProxy
impl ShutdownWatcherRegisterProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.hardware.power.statecontrol/ShutdownWatcherRegister.
Sourcepub fn take_event_stream(&self) -> ShutdownWatcherRegisterEventStream
pub fn take_event_stream(&self) -> ShutdownWatcherRegisterEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn register_watcher(
&self,
watcher: ClientEnd<ShutdownWatcherMarker>,
) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
pub fn register_watcher( &self, watcher: ClientEnd<ShutdownWatcherMarker>, ) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
Registers a watcher to be notified when the Shutdown method is called.
Once the watcher has been successfully registered with the server, then the request will be completed and the ShutdownWatcherRegister channel will be left open (though a client is free to close it at this time).
If there is an error in registering the watcher, then the ShutdownWatcherRegister channel will be closed without completing the request.
The provided watcher channel will be used at most once to notify the
watcher of an impending shutdown and allow it the chance to respond.
Watchers can unregister by closing their ShutdownWatcher channel.
Trait Implementations§
Source§impl Clone for ShutdownWatcherRegisterProxy
impl Clone for ShutdownWatcherRegisterProxy
Source§fn clone(&self) -> ShutdownWatcherRegisterProxy
fn clone(&self) -> ShutdownWatcherRegisterProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ShutdownWatcherRegisterProxy
impl Debug for ShutdownWatcherRegisterProxy
Source§impl Proxy for ShutdownWatcherRegisterProxy
impl Proxy for ShutdownWatcherRegisterProxy
Source§type Protocol = ShutdownWatcherRegisterMarker
type Protocol = ShutdownWatcherRegisterMarker
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
Source§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Source§fn on_closed(&self) -> OnSignals<'_, Unowned<'_, NullableHandle>>
fn on_closed(&self) -> OnSignals<'_, Unowned<'_, NullableHandle>>
PEER_CLOSED signal.