pub enum ShutdownWatcherRegisterRequest {
RegisterWatcher {
watcher: ClientEnd<ShutdownWatcherMarker>,
responder: ShutdownWatcherRegisterRegisterWatcherResponder,
},
#[non_exhaustive] _UnknownMethod {
ordinal: u64,
control_handle: ShutdownWatcherRegisterControlHandle,
method_type: MethodType,
},
}Expand description
Allows components to register a callback that will be executed when the Shutdown method is called. The main purpose of this protocol is to be able to track shutdown reasons. Consider relying on Component Framework’s orderly shutdown if you’re looking at using this protocol.
Variants§
RegisterWatcher
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.
Fields
watcher: ClientEnd<ShutdownWatcherMarker>#[non_exhaustive]_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
control_handle: ShutdownWatcherRegisterControlHandlemethod_type: MethodTypeImplementations§
Source§impl ShutdownWatcherRegisterRequest
impl ShutdownWatcherRegisterRequest
pub fn into_register_watcher( self, ) -> Option<(ClientEnd<ShutdownWatcherMarker>, ShutdownWatcherRegisterRegisterWatcherResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL