pub struct ClientSideBatonManagementProxy { /* private fields */ }
Implementations§
Source§impl ClientSideBatonManagementProxy
impl ClientSideBatonManagementProxy
Sourcepub fn new(channel: AsyncChannel) -> Self
pub fn new(channel: AsyncChannel) -> Self
Create a new Proxy for fuchsia.time.alarms/ClientSideBatonManagement.
Sourcepub fn take_event_stream(&self) -> ClientSideBatonManagementEventStream
pub fn take_event_stream(&self) -> ClientSideBatonManagementEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn set_and_wait(
&self,
deadline: BootInstant,
setup_done: Event,
alarm_id: &str,
) -> QueryResponseFut<ClientSideBatonManagementSetAndWaitResult, DefaultFuchsiaResourceDialect>
pub fn set_and_wait( &self, deadline: BootInstant, setup_done: Event, alarm_id: &str, ) -> QueryResponseFut<ClientSideBatonManagementSetAndWaitResult, DefaultFuchsiaResourceDialect>
Sets a wake alarm with the provided parameters, and waits for the alarm to fire.
The caller MAY request multiple alarms open concurrently. However, the callee is not required to support any specific number of open alarms.
The call to SetAndWait will hang until the alarm fires, or an error occurs.
In the event that the caller requests more open alarms than the callee is willing to provide, the callee SHOULD reject the new request, but honor previous requests.
§Return value
keep_alive
: a handle which prevents system suspend so long as it is held alive.
This method will return when the alarm set in the call fires.
§Protocol Errors
- [DROPPED] if the alarm has been canceled by using [Cancel].
- [UNSPECIFIED] a new error mode has occurred, please report this for investigatin.
- [INTERNAL] is a bug: an internal fallible call (which is expected to be unlikely to fail) has failed somehow. Please report this for investigation.
Sourcepub fn cancel(&self, alarm_id: &str) -> Result<(), Error>
pub fn cancel(&self, alarm_id: &str) -> Result<(), Error>
Cancels the alarm specified by alarm_id
.
Providing an alarm_id
of an alarm that is not scheduled quietly
succeeds.
Sourcepub fn cancel_sync(
&self,
alarm_id: &str,
) -> QueryResponseFut<ClientSideBatonManagementCancelSyncResult, DefaultFuchsiaResourceDialect>
pub fn cancel_sync( &self, alarm_id: &str, ) -> QueryResponseFut<ClientSideBatonManagementCancelSyncResult, DefaultFuchsiaResourceDialect>
Same as [Cancel], but waits until alarm_id
is canceled.
Trait Implementations§
Source§impl ClientSideBatonManagementProxyInterface for ClientSideBatonManagementProxy
impl ClientSideBatonManagementProxyInterface for ClientSideBatonManagementProxy
type SetAndWaitResponseFut = QueryResponseFut<Result<EventPair, WakeError>>
type CancelSyncResponseFut = QueryResponseFut<Result<(), WakeError>>
fn set_and_wait( &self, deadline: BootInstant, setup_done: Event, alarm_id: &str, ) -> Self::SetAndWaitResponseFut
fn cancel(&self, alarm_id: &str) -> Result<(), Error>
fn cancel_sync(&self, alarm_id: &str) -> Self::CancelSyncResponseFut
Source§impl Clone for ClientSideBatonManagementProxy
impl Clone for ClientSideBatonManagementProxy
Source§fn clone(&self) -> ClientSideBatonManagementProxy
fn clone(&self) -> ClientSideBatonManagementProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Proxy for ClientSideBatonManagementProxy
impl Proxy for ClientSideBatonManagementProxy
Source§type Protocol = ClientSideBatonManagementMarker
type Protocol = ClientSideBatonManagementMarker
Proxy
controls.