Skip to main content

Driver

Trait Driver 

Source
pub trait Driver {
    // Required method
    fn execute(
        &mut self,
        action: &Action,
        revoked: &CancellationToken,
    ) -> impl Future<Output = Result<Observation>> + Send;
}
Expand description

An instance is bound to one target. The driver owns delivery checks and cleanup even when an action future is dropped while input is in flight.

Required Methods§

Source

fn execute( &mut self, action: &Action, revoked: &CancellationToken, ) -> impl Future<Output = Result<Observation>> + Send

Dispatch one action, observing revocation before and during target delivery.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§

Source§

impl<R, W> Driver for BrowserDriver<R, W>
where R: AsyncRead + Unpin + Send, W: AsyncWrite + Unpin + Send,