pub struct SuspenderProxy { /* private fields */ }
Implementations§
Source§impl SuspenderProxy
impl SuspenderProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.hardware.suspend/Suspender.
Sourcepub fn take_event_stream(&self) -> SuspenderEventStream
pub fn take_event_stream(&self) -> SuspenderEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn get_suspend_states(
&self,
) -> QueryResponseFut<SuspenderGetSuspendStatesResult, DefaultFuchsiaResourceDialect>
pub fn get_suspend_states( &self, ) -> QueryResponseFut<SuspenderGetSuspendStatesResult, DefaultFuchsiaResourceDialect>
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,
) -> QueryResponseFut<SuspenderSuspendResult, DefaultFuchsiaResourceDialect>
pub fn suspend( &self, payload: &SuspenderSuspendRequest, ) -> QueryResponseFut<SuspenderSuspendResult, DefaultFuchsiaResourceDialect>
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 Clone for SuspenderProxy
impl Clone for SuspenderProxy
Source§fn clone(&self) -> SuspenderProxy
fn clone(&self) -> SuspenderProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for SuspenderProxy
impl Debug for SuspenderProxy
Source§impl Proxy for SuspenderProxy
impl Proxy for SuspenderProxy
Source§type Protocol = SuspenderMarker
type Protocol = SuspenderMarker
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
§fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
fn into_client_end(self) -> Result<ClientEnd<Self::Protocol>, Self>
Source§impl SuspenderProxyInterface for SuspenderProxy
impl SuspenderProxyInterface for SuspenderProxy
type GetSuspendStatesResponseFut = QueryResponseFut<Result<SuspenderGetSuspendStatesResponse, i32>>
type SuspendResponseFut = QueryResponseFut<Result<SuspenderSuspendResponse, i32>>
fn get_suspend_states(&self) -> Self::GetSuspendStatesResponseFut
fn suspend(&self, payload: &SuspenderSuspendRequest) -> Self::SuspendResponseFut
Auto Trait Implementations§
impl Freeze for SuspenderProxy
impl !RefUnwindSafe for SuspenderProxy
impl Send for SuspenderProxy
impl Sync for SuspenderProxy
impl Unpin for SuspenderProxy
impl !UnwindSafe for SuspenderProxy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)