pub struct ActivityGovernorListenerProxy { /* private fields */ }
Implementations§
Source§impl ActivityGovernorListenerProxy
impl ActivityGovernorListenerProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.power.system/ActivityGovernorListener.
Sourcepub fn take_event_stream(&self) -> ActivityGovernorListenerEventStream
pub fn take_event_stream(&self) -> ActivityGovernorListenerEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn on_resume(&self) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
pub fn on_resume(&self) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
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,
) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
pub fn on_suspend_started( &self, ) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
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 ActivityGovernorListenerProxyInterface for ActivityGovernorListenerProxy
impl ActivityGovernorListenerProxyInterface for ActivityGovernorListenerProxy
type OnResumeResponseFut = QueryResponseFut<()>
type OnSuspendStartedResponseFut = QueryResponseFut<()>
fn on_resume(&self) -> Self::OnResumeResponseFut
fn on_suspend_started(&self) -> Self::OnSuspendStartedResponseFut
Source§impl Clone for ActivityGovernorListenerProxy
impl Clone for ActivityGovernorListenerProxy
Source§fn clone(&self) -> ActivityGovernorListenerProxy
fn clone(&self) -> ActivityGovernorListenerProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Proxy for ActivityGovernorListenerProxy
impl Proxy for ActivityGovernorListenerProxy
Source§type Protocol = ActivityGovernorListenerMarker
type Protocol = ActivityGovernorListenerMarker
Proxy
controls.