pub struct ShutdownWatcherRegisterSynchronousProxy { /* private fields */ }Implementations§
Source§impl ShutdownWatcherRegisterSynchronousProxy
impl ShutdownWatcherRegisterSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<ShutdownWatcherRegisterEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<ShutdownWatcherRegisterEvent, 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 register_watcher(
&self,
watcher: ClientEnd<ShutdownWatcherMarker>,
___deadline: MonotonicInstant,
) -> Result<(), Error>
pub fn register_watcher( &self, watcher: ClientEnd<ShutdownWatcherMarker>, ___deadline: MonotonicInstant, ) -> Result<(), Error>
Registers a watcher to be notified when the Admin.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.
Sourcepub fn register_terminal_state_watcher(
&self,
watcher: ClientEnd<TerminalStateWatcherMarker>,
___deadline: MonotonicInstant,
) -> Result<(), Error>
pub fn register_terminal_state_watcher( &self, watcher: ClientEnd<TerminalStateWatcherMarker>, ___deadline: MonotonicInstant, ) -> Result<(), Error>
Registers a watcher to be notified when the system begins a transition to a terminal state regardless of the trigger.
The [TerminalStateWatcher] is notified for all reboots, power-offs, and kernel-initiated
shutdowns. It does not provide reasons or options.
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 TerminalStateWatcher channel.
Trait Implementations§
Source§impl From<Channel> for ShutdownWatcherRegisterSynchronousProxy
Available on Fuchsia only.
impl From<Channel> for ShutdownWatcherRegisterSynchronousProxy
Source§impl From<ShutdownWatcherRegisterSynchronousProxy> for NullableHandle
Available on Fuchsia only.
impl From<ShutdownWatcherRegisterSynchronousProxy> for NullableHandle
Source§fn from(value: ShutdownWatcherRegisterSynchronousProxy) -> Self
fn from(value: ShutdownWatcherRegisterSynchronousProxy) -> Self
Source§impl FromClient for ShutdownWatcherRegisterSynchronousProxy
Available on Fuchsia only.
impl FromClient for ShutdownWatcherRegisterSynchronousProxy
Source§type Protocol = ShutdownWatcherRegisterMarker
type Protocol = ShutdownWatcherRegisterMarker
Source§fn from_client(value: ClientEnd<ShutdownWatcherRegisterMarker>) -> Self
fn from_client(value: ClientEnd<ShutdownWatcherRegisterMarker>) -> Self
Source§impl SynchronousProxy for ShutdownWatcherRegisterSynchronousProxy
Available on Fuchsia only.
impl SynchronousProxy for ShutdownWatcherRegisterSynchronousProxy
Source§type Proxy = ShutdownWatcherRegisterProxy
type Proxy = ShutdownWatcherRegisterProxy
Source§type Protocol = ShutdownWatcherRegisterMarker
type Protocol = ShutdownWatcherRegisterMarker
Proxy controls.