Skip to main content

StatusWatcherLocalServerHandler

Trait StatusWatcherLocalServerHandler 

Source
pub trait StatusWatcherLocalServerHandler<___T: Transport = Channel> {
    // Required method
    fn watch_status(
        &mut self,
        responder: Responder<WatchStatus, ___T>,
    ) -> impl Future<Output = ()>;
}
Expand description

A server handler for the StatusWatcher protocol.

See StatusWatcher for more details.

Required Methods§

Source

fn watch_status( &mut self, responder: Responder<WatchStatus, ___T>, ) -> impl Future<Output = ()>

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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<___H, ___T> StatusWatcherLocalServerHandler<___T> for Local<___H>
where ___H: StatusWatcherServerHandler<___T>, ___T: Transport,

Source§

async fn watch_status(&mut self, responder: Responder<WatchStatus, ___T>)

Implementors§