pub struct WakeGroupProxy { /* private fields */ }
Implementations§
Source§impl WakeGroupProxy
impl WakeGroupProxy
Sourcepub fn take_event_stream(&self) -> WakeGroupEventStream
pub fn take_event_stream(&self) -> WakeGroupEventStream
Get a Stream of events from the remote end of the protocol.
§Panics
Panics if the event stream was already taken.
Sourcepub fn wait_for_data(
&self,
) -> QueryResponseFut<WakeGroupWaitForDataResponse, DefaultFuchsiaResourceDialect>
pub fn wait_for_data( &self, ) -> QueryResponseFut<WakeGroupWaitForDataResponse, DefaultFuchsiaResourceDialect>
Registers the client to be woken up (in the form of a response) when there is incoming data available for any of the resources registered with this wake group.
Note that the client is required to “arm” this hanging get by calling
Arm
in order to ensure a response. Once the WaitForData
call has
returned, the next call to the method will hang until Arm
has been
called again and new data has arrived. In other words, Arm
re-arms
the hanging get and should be called when a response is required in
order to be woken up.
If the caller is responsible for keeping the system awake while handling the incoming data, the netstack will delegate (baton-pass) a lease to the caller that it can retain until it is ready to allow the system to suspend.
Sourcepub fn arm(&self) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
pub fn arm(&self) -> QueryResponseFut<(), DefaultFuchsiaResourceDialect>
Notifies the netstack that the client has handled any previous
WaitForData
response that has arrived on the channel, and expects to
be woken up again when data arrives, in the form of a response to the
pending WaitForData
call.
In other words, calling this method “re-arms” the hanging get.
Trait Implementations§
Source§impl Clone for WakeGroupProxy
impl Clone for WakeGroupProxy
Source§fn clone(&self) -> WakeGroupProxy
fn clone(&self) -> WakeGroupProxy
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for WakeGroupProxy
impl Debug for WakeGroupProxy
Source§impl Proxy for WakeGroupProxy
impl Proxy for WakeGroupProxy
Source§type Protocol = WakeGroupMarker
type Protocol = WakeGroupMarker
Proxy
controls.