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: MonotonicInstant,
) -> Result<DeviceWatcherEvent, Error>
pub fn wait_for_event( &self, deadline: MonotonicInstant, ) -> 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 watch_devices(
&self,
___deadline: MonotonicInstant,
) -> Result<(Vec<String>, Vec<String>), Error>
pub fn watch_devices( &self, ___deadline: MonotonicInstant, ) -> Result<(Vec<String>, Vec<String>), Error>
Observes when devices are added or removed.
The first call to this method returns immediately with a
DeviceChanges struct containing only items in the added field with
the names of all of the current devices. Subsequent calls
will block until a device has been added or removed, at which
point it will return with the added and/or removed fields
filled out accordingly. The changes are reported since the
time that the method returned.
If both the added and removed fields have names in the returned
table, then the removed field MUST be processed BEFORE added field.
If a device was added and then removed in-between calls to this
method, the device will be absent from both the added and removed
lists.
If the same device name is listed on both the added and removed
fields, then the client should assume that the original device was
removed and a new device instance started in its place. However, while
the client should be able to handle this condition, it should not depend
on the server will always have this behavior.
Trait Implementations§
Source§impl From<Channel> for DeviceWatcherSynchronousProxy
Available on Fuchsia only.
impl From<Channel> for DeviceWatcherSynchronousProxy
Source§impl From<DeviceWatcherSynchronousProxy> for Handle
Available on Fuchsia only.
impl From<DeviceWatcherSynchronousProxy> for Handle
Source§fn from(value: DeviceWatcherSynchronousProxy) -> Self
fn from(value: DeviceWatcherSynchronousProxy) -> Self
Source§impl FromClient for DeviceWatcherSynchronousProxy
Available on Fuchsia only.
impl FromClient for DeviceWatcherSynchronousProxy
Source§type Protocol = DeviceWatcherMarker
type Protocol = DeviceWatcherMarker
Source§fn from_client(value: ClientEnd<DeviceWatcherMarker>) -> Self
fn from_client(value: ClientEnd<DeviceWatcherMarker>) -> Self
Source§impl SynchronousProxy for DeviceWatcherSynchronousProxy
Available on Fuchsia only.
impl SynchronousProxy for DeviceWatcherSynchronousProxy
Source§type Proxy = DeviceWatcherProxy
type Proxy = DeviceWatcherProxy
Source§type Protocol = DeviceWatcherMarker
type Protocol = DeviceWatcherMarker
Proxy controls.