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.power.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.power.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.
Sourcepub fn force_lowest_power_mode(
&self,
payload: &SuspenderForceLowestPowerModeRequest,
___deadline: MonotonicInstant,
) -> Result<SuspenderForceLowestPowerModeResult, Error>
pub fn force_lowest_power_mode( &self, payload: &SuspenderForceLowestPowerModeRequest, ___deadline: MonotonicInstant, ) -> Result<SuspenderForceLowestPowerModeResult, Error>
Forcibly puts the system into its lowest power mode. TODO(b/454722784): Consider removing this in the future.
Trait Implementations§
Source§impl Debug for SuspenderSynchronousProxy
impl Debug for SuspenderSynchronousProxy
Source§impl From<Channel> for SuspenderSynchronousProxy
Available on Fuchsia only.
impl From<Channel> for SuspenderSynchronousProxy
Source§impl From<SuspenderSynchronousProxy> for NullableHandle
Available on Fuchsia only.
impl From<SuspenderSynchronousProxy> for NullableHandle
Source§fn from(value: SuspenderSynchronousProxy) -> Self
fn from(value: SuspenderSynchronousProxy) -> Self
Source§impl FromClient for SuspenderSynchronousProxy
Available on Fuchsia only.
impl FromClient for SuspenderSynchronousProxy
Source§type Protocol = SuspenderMarker
type Protocol = SuspenderMarker
Source§fn from_client(value: ClientEnd<SuspenderMarker>) -> Self
fn from_client(value: ClientEnd<SuspenderMarker>) -> Self
Source§impl SynchronousProxy for SuspenderSynchronousProxy
Available on Fuchsia only.
impl SynchronousProxy for SuspenderSynchronousProxy
Source§type Proxy = SuspenderProxy
type Proxy = SuspenderProxy
Source§type Protocol = SuspenderMarker
type Protocol = SuspenderMarker
Proxy controls.