pub enum ActivityGovernorListenerRequest {
OnResume {
responder: ActivityGovernorListenerOnResumeResponder,
},
OnSuspendStarted {
responder: ActivityGovernorListenerOnSuspendStartedResponder,
},
OnSuspendFail {
responder: ActivityGovernorListenerOnSuspendFailResponder,
},
_UnknownMethod {
ordinal: u64,
control_handle: ActivityGovernorListenerControlHandle,
method_type: MethodType,
},
}
Expand description
A listener for activity governor events.
Variants§
OnResume
Called when the activity governor detects a system resume.
This is only called when the wakeup reason returned by the platform requires a full system resume. The server is expected to respond once it has performed the operations required to keep the system awake, if needed.
Fields
responder: ActivityGovernorListenerOnResumeResponder
OnSuspendStarted
Called before the activity governor initiates a system suspension.
The server is expected to respond once it has performed the operations it needs to prepare itself for suspend, if any.
Fields
OnSuspendFail
Called when the activity governor detects a suspend failure.
The server is expected to respond to this notification. The activity governor will not attempt to suspend again until it receives the respond.
Fields
_UnknownMethod
An interaction was received which does not match any known method.
Fields
This variant is marked as non-exhaustive
control_handle: ActivityGovernorListenerControlHandle
method_type: MethodType
Implementations§
Source§impl ActivityGovernorListenerRequest
impl ActivityGovernorListenerRequest
pub fn into_on_resume(self) -> Option<ActivityGovernorListenerOnResumeResponder>
pub fn into_on_suspend_started( self, ) -> Option<ActivityGovernorListenerOnSuspendStartedResponder>
pub fn into_on_suspend_fail( self, ) -> Option<ActivityGovernorListenerOnSuspendFailResponder>
Sourcepub fn method_name(&self) -> &'static str
pub fn method_name(&self) -> &'static str
Name of the method defined in FIDL