pub struct DeviceWatcherSynchronousProxy { /* private fields */ }
Implementations§
source§impl DeviceWatcherSynchronousProxy
impl DeviceWatcherSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
sourcepub fn wait_for_event(
&self,
deadline: Time
) -> Result<DeviceWatcherEvent, Error>
pub fn wait_for_event( &self, deadline: Time ) -> Result<DeviceWatcherEvent, 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 next_device(
&self,
___deadline: Time
) -> Result<DeviceWatcherNextDeviceResult, Error>
pub fn next_device( &self, ___deadline: Time ) -> Result<DeviceWatcherNextDeviceResult, Error>
A Hanging-Get API that returns the next device. This will not return until there is a new device available. Call this repeatedly to get all devices. If there is already an outstanding request then calling this again will return ZX_ERR_ALREADY_BOUND.