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 SynchronousProxy for DeviceWatcherSynchronousProxy
impl SynchronousProxy for DeviceWatcherSynchronousProxy
Source§type Proxy = DeviceWatcherProxy
type Proxy = DeviceWatcherProxy
Source§type Protocol = DeviceWatcherMarker
type Protocol = DeviceWatcherMarker
Proxy
controls.