pub struct StatusWatcherSynchronousProxy { /* private fields */ }
Implementations§
source§impl StatusWatcherSynchronousProxy
impl StatusWatcherSynchronousProxy
pub fn new(channel: Channel) -> Self
pub fn into_channel(self) -> Channel
sourcepub fn wait_for_event(
&self,
deadline: Time
) -> Result<StatusWatcherEvent, Error>
pub fn wait_for_event( &self, deadline: Time ) -> Result<StatusWatcherEvent, 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_status(&self, ___deadline: Time) -> Result<PortStatus, Error>
pub fn watch_status(&self, ___deadline: Time) -> Result<PortStatus, Error>
WatchStatus
blocks until the port’s status has changed.
The first call to WatchStatus
returns immediately with the current
port status, subsequent calls complete when the port status differs from
the last one that was returned through this StatusWatcher
.
If StatusWatcher
was created with a buffer value larger than 1,
WatchStatus
may return a queued status change, depending on how many
status changed happened since the last call to WatchStatus
.
- response
device_status
the most recent port status.