pub enum RebootMethodsWatcherRegisterRequest {
Register {
watcher: ClientEnd<RebootMethodsWatcherMarker>,
control_handle: RebootMethodsWatcherRegisterControlHandle,
},
RegisterWithAck {
watcher: ClientEnd<RebootMethodsWatcherMarker>,
responder: RebootMethodsWatcherRegisterRegisterWithAckResponder,
},
}
Expand description
Allows components to register a callback that will be executed when a Reboot method is called. The main purpose of this protocol is to be able to track reboot reasons. Consider relying on Component Framework’s orderly shutdown if you’re looking at using this protocol.
Variants§
Register
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.
Fields
watcher: ClientEnd<RebootMethodsWatcherMarker>
control_handle: RebootMethodsWatcherRegisterControlHandle
RegisterWithAck
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.
Fields
watcher: ClientEnd<RebootMethodsWatcherMarker>
Implementations§
source§impl RebootMethodsWatcherRegisterRequest
impl RebootMethodsWatcherRegisterRequest
pub fn into_register( self ) -> Option<(ClientEnd<RebootMethodsWatcherMarker>, RebootMethodsWatcherRegisterControlHandle)>
pub fn into_register_with_ack( self ) -> Option<(ClientEnd<RebootMethodsWatcherMarker>, RebootMethodsWatcherRegisterRegisterWithAckResponder)>
sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL