pub enum ListenerRegistryRequest {
RegisterBlockingListener {
listener: ClientEnd<BlockingListenerMarker>,
responder: ListenerRegistryRegisterBlockingListenerResponder,
},
_UnknownMethod {
ordinal: u64,
control_handle: ListenerRegistryControlHandle,
method_type: MethodType,
},
}
Expand description
Allows components to request callbacks on power-state changes.
The timing of acknowledgements from BlockingListener
s affects
the suspend and resume processes, as the ListenerRegistry
MUST
wait for the BlockingListener
s to respond.
Note, however, that the ListenerRegistry
MAY apply a timeout
to the responses.
Variants§
RegisterBlockingListener
Registers listener
with the registry.
When the ListenerRegistry
learns of power state changes, the
ListenerRegistry
will forward the event to the listener
.
See documentation of the BlockingListener
methods for details
on which events are available, and the semantics of each callback.
The ListenerRegistry
MUST continue to forward events to the
listener
, even after the ListenerRegistry
connection
is closed.
Replaces any existing listener
that was previously registered.
Fields
listener: ClientEnd<BlockingListenerMarker>
_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
control_handle: ListenerRegistryControlHandle
method_type: MethodType
Implementations§
Source§impl ListenerRegistryRequest
impl ListenerRegistryRequest
pub fn into_register_blocking_listener( self, ) -> Option<(ClientEnd<BlockingListenerMarker>, ListenerRegistryRegisterBlockingListenerResponder)>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL