pub struct ActivityGovernorListenerSynchronousProxy { /* private fields */ }
Implementations§
Source§impl ActivityGovernorListenerSynchronousProxy
impl ActivityGovernorListenerSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<ActivityGovernorListenerEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<ActivityGovernorListenerEvent, Error>
Waits until an event arrives and returns it. It is safe for other threads to make concurrent requests while waiting for an event.
Sourcepub fn on_resume(&self, ___deadline: MonotonicInstant) -> Result<(), Error>
pub fn on_resume(&self, ___deadline: MonotonicInstant) -> Result<(), Error>
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. All dependencies of ExecutionStateLevel::SUSPENDING are guaranteed to be satisified when this call is issued, and the listener’s OnSuspendStarted method will be invoked before that guarantee is removed.
SAG does not block on the response to this method, so the listener may safely take actions that block on raising Execution State’s power level. In particular, it is not affected by https://fxbug.dev/391429689.
Sourcepub fn on_suspend_started(
&self,
___deadline: MonotonicInstant,
) -> Result<(), Error>
pub fn on_suspend_started( &self, ___deadline: MonotonicInstant, ) -> Result<(), Error>
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. All dependencies of ExecutionStateLevel::SUSPENDING are guaranteed to be satisified for the duration of this call.
It is not safe for this method to call ActivityGovernor.TakeApplicationActivityLease or to perform any other action that blocks on raising Execution State above its Inactive level. (However, AcquireWakeLease does not block in this way and is safe to call.) Doing so will currently result in a deadlock. This constraint will eventually be removed; see https://fxbug.dev/391429689.
Trait Implementations§
Source§impl SynchronousProxy for ActivityGovernorListenerSynchronousProxy
impl SynchronousProxy for ActivityGovernorListenerSynchronousProxy
Source§type Proxy = ActivityGovernorListenerProxy
type Proxy = ActivityGovernorListenerProxy
Source§type Protocol = ActivityGovernorListenerMarker
type Protocol = ActivityGovernorListenerMarker
Proxy
controls.