pub struct SuspendBlockerSynchronousProxy { /* private fields */ }Implementations§
Source§impl SuspendBlockerSynchronousProxy
impl SuspendBlockerSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<SuspendBlockerEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<SuspendBlockerEvent, 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 before_suspend(&self, ___deadline: MonotonicInstant) -> Result<(), Error>
pub fn before_suspend(&self, ___deadline: MonotonicInstant) -> Result<(), Error>
Called after system activity governor begins operations to suspend the hardware platform.
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 and may be revoked once the server replies.
Operations to suspend the hardware platform may vary between different
hardware platforms and product configurations. At a minimum, the client
and server MUST assume that general code execution continues
until a reply to this call is received by the client. If the
SuspendBlocker wants to preempt suspend operations, it MUST call
ActivityGovernor.AcquireWakeLease before replying to this call.
ExecutionState will be at its SUSPENDING level for the duration of this
call. Consequently, a SuspendBlocker MUST NOT call
ActivityGovernor.TakeApplicationActivityLease nor perform any other
action that blocks on Execution State reaching a level other than
INACTIVE. Doing so will result in a deadlock. (However, AcquireWakeLease
does not block in this way and is safe to call.)
Sourcepub fn after_resume(&self, ___deadline: MonotonicInstant) -> Result<(), Error>
pub fn after_resume(&self, ___deadline: MonotonicInstant) -> Result<(), Error>
Called after system activity governor is aware that the hardware platform has resumed.
For the duration of this call, ExecutionState is at level INACTIVE,
but all dependencies of ExecutionStateLevel::SUSPENDING are guaranteed
be satisified.
Consequently, a SuspendBlocker MUST NOT call
ActivityGovernor.TakeApplicationActivityLease nor perform any other
action that blocks on Execution State reaching a level other than
INACTIVE. Doing so will result in a deadlock. (However, AcquireWakeLease
does not block in this way and is safe to call.)
Trait Implementations§
Source§impl From<Channel> for SuspendBlockerSynchronousProxy
Available on Fuchsia only.
impl From<Channel> for SuspendBlockerSynchronousProxy
Source§impl From<SuspendBlockerSynchronousProxy> for NullableHandle
Available on Fuchsia only.
impl From<SuspendBlockerSynchronousProxy> for NullableHandle
Source§fn from(value: SuspendBlockerSynchronousProxy) -> Self
fn from(value: SuspendBlockerSynchronousProxy) -> Self
Source§impl FromClient for SuspendBlockerSynchronousProxy
Available on Fuchsia only.
impl FromClient for SuspendBlockerSynchronousProxy
Source§type Protocol = SuspendBlockerMarker
type Protocol = SuspendBlockerMarker
Source§fn from_client(value: ClientEnd<SuspendBlockerMarker>) -> Self
fn from_client(value: ClientEnd<SuspendBlockerMarker>) -> Self
Source§impl SynchronousProxy for SuspendBlockerSynchronousProxy
Available on Fuchsia only.
impl SynchronousProxy for SuspendBlockerSynchronousProxy
Source§type Proxy = SuspendBlockerProxy
type Proxy = SuspendBlockerProxy
Source§type Protocol = SuspendBlockerMarker
type Protocol = SuspendBlockerMarker
Proxy controls.