pub struct StatusWatcherProxy { /* private fields */ }
Implementations§
source§impl StatusWatcherProxy
impl StatusWatcherProxy
sourcepub fn take_event_stream(&self) -> StatusWatcherEventStream
pub fn take_event_stream(&self) -> StatusWatcherEventStream
Get a Stream of events from the remote end of the StatusWatcher protocol
Panics
Panics if the event stream was already taken.
sourcepub fn watch_status(&self) -> QueryResponseFut<PortStatus>
pub fn watch_status(&self) -> QueryResponseFut<PortStatus>
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.
Trait Implementations§
source§impl Clone for StatusWatcherProxy
impl Clone for StatusWatcherProxy
source§fn clone(&self) -> StatusWatcherProxy
fn clone(&self) -> StatusWatcherProxy
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for StatusWatcherProxy
impl Debug for StatusWatcherProxy
source§impl Proxy for StatusWatcherProxy
impl Proxy for StatusWatcherProxy
§type Protocol = StatusWatcherMarker
type Protocol = StatusWatcherMarker
The protocol which this
Proxy
controls.source§fn from_channel(inner: AsyncChannel) -> Self
fn from_channel(inner: AsyncChannel) -> Self
Create a proxy over the given channel.
source§fn into_channel(self) -> Result<AsyncChannel, Self>
fn into_channel(self) -> Result<AsyncChannel, Self>
Attempt to convert the proxy back into a channel. Read more
source§fn as_channel(&self) -> &AsyncChannel
fn as_channel(&self) -> &AsyncChannel
Get a reference to the proxy’s underlying channel. Read more