pub struct SuspenderSynchronousProxy { /* private fields */ }
Implementations§
Source§impl SuspenderSynchronousProxy
impl SuspenderSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
Sourcepub fn wait_for_event(
&self,
deadline: MonotonicInstant,
) -> Result<SuspenderEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> Result<SuspenderEvent, 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 get_suspend_states(
&self,
___deadline: MonotonicInstant,
) -> Result<SuspenderGetSuspendStatesResult, Error>
pub fn get_suspend_states( &self, ___deadline: MonotonicInstant, ) -> Result<SuspenderGetSuspendStatesResult, Error>
Returns a list of [fuchsia.hardware.suspend/SuspendState
] supported.
by the system. The system must return at least 1 suspend state which
corresponds to the “suspend-to-idle” state but may return up to
[fuchsia.hardware.suspend/MAX_SUSPEND_STATES
] states.
The suspend states must be ordered in order of decreasing
resume_latency
(and thereby increasing power consumption).
A particular build of the system must always return the same set of
suspend states.
Sourcepub fn suspend(
&self,
payload: &SuspenderSuspendRequest,
___deadline: MonotonicInstant,
) -> Result<SuspenderSuspendResult, Error>
pub fn suspend( &self, payload: &SuspenderSuspendRequest, ___deadline: MonotonicInstant, ) -> Result<SuspenderSuspendResult, Error>
Instruct the system to suspend.
This call may return a ZX_ERR_* if the system was unable to suspend.
If the call succeeds, it will not return until the system has resumed.
Being interrupted while suspending and resuming before fully suspending
is not an error however suspend_duration
must be None if the suspend
was interrupted.
Trait Implementations§
Source§impl Debug for SuspenderSynchronousProxy
impl Debug for SuspenderSynchronousProxy
Source§impl SynchronousProxy for SuspenderSynchronousProxy
impl SynchronousProxy for SuspenderSynchronousProxy
Source§type Proxy = SuspenderProxy
type Proxy = SuspenderProxy
Source§type Protocol = SuspenderMarker
type Protocol = SuspenderMarker
Proxy
controls.