pub struct SuspendBlockerProxy { /* private fields */ }Implementations§
Source§impl SuspendBlockerProxy
impl SuspendBlockerProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.power.system/SuspendBlocker.
Sourcepub fn take_event_stream(&self) -> SuspendBlockerEventStream
pub fn take_event_stream(&self) -> SuspendBlockerEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn before_suspend(
&self,
) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
pub fn before_suspend( &self, ) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
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,
) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
pub fn after_resume( &self, ) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
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 Clone for SuspendBlockerProxy
impl Clone for SuspendBlockerProxy
Source§fn clone(&self) -> SuspendBlockerProxy
fn clone(&self) -> SuspendBlockerProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SuspendBlockerProxy
impl Debug for SuspendBlockerProxy
Source§impl Proxy for SuspendBlockerProxy
impl Proxy for SuspendBlockerProxy
Source§type Protocol = SuspendBlockerMarker
type Protocol = SuspendBlockerMarker
Proxy controls.Source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
Source§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Source§fn on_closed(&self) -> OnSignals<'_, Unowned<'_, NullableHandle>>
fn on_closed(&self) -> OnSignals<'_, Unowned<'_, NullableHandle>>
PEER_CLOSED signal.