pub struct RebootMethodsWatcherRegisterProxy { /* private fields */ }
Implementations§
source§impl RebootMethodsWatcherRegisterProxy
impl RebootMethodsWatcherRegisterProxy
sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.hardware.power.statecontrol/RebootMethodsWatcherRegister.
sourcepub fn take_event_stream(&self) -> RebootMethodsWatcherRegisterEventStream
pub fn take_event_stream(&self) -> RebootMethodsWatcherRegisterEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
sourcepub fn register(
&self,
watcher: ClientEnd<RebootMethodsWatcherMarker>
) -> Result<(), Error>
pub fn register( &self, watcher: ClientEnd<RebootMethodsWatcherMarker> ) -> Result<(), Error>
Register a watcher to be notified when a Reboot method is called. The Register channel will be used at most once to notify the watcher of an impending reboot and allow it the chance to respond.
Watchers can unregister by closing the underlying channel.
sourcepub fn register_with_ack(
&self,
watcher: ClientEnd<RebootMethodsWatcherMarker>
) -> QueryResponseFut<()>
pub fn register_with_ack( &self, watcher: ClientEnd<RebootMethodsWatcherMarker> ) -> QueryResponseFut<()>
Registers a watcher to be notified when a Reboot method is called.
Once the watcher has been successfully registered with the server, then the request will be completed and the RebootMethodsWatcherRegister 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 RebootMethodsWatcherRegister 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 reboot and allow it the chance to respond.
Watchers can unregister by closing their RebootMethodsWatcher
channel.
Trait Implementations§
source§impl Clone for RebootMethodsWatcherRegisterProxy
impl Clone for RebootMethodsWatcherRegisterProxy
source§fn clone(&self) -> RebootMethodsWatcherRegisterProxy
fn clone(&self) -> RebootMethodsWatcherRegisterProxy
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Proxy for RebootMethodsWatcherRegisterProxy
impl Proxy for RebootMethodsWatcherRegisterProxy
§type Protocol = RebootMethodsWatcherRegisterMarker
type Protocol = RebootMethodsWatcherRegisterMarker
Proxy
controls.