Skip to main content

Reconnector

Trait Reconnector 

Source
pub trait Reconnector:
    Send
    + Sync
    + 'static {
    // Required method
    fn connect<'a>(
        &'a self,
    ) -> Pin<Box<dyn Future<Output = Result<(Box<dyn TransportSink>, Box<dyn TransportStream>), TransportError>> + Send + 'a>>;
}
Expand description

(Re-)establishes a transport connection from scratch. Called by Client’s background read loop after the current transport reports it closed (TransportStream::recv returning Ok(None) or Err(_)).

Required Methods§

Source

fn connect<'a>( &'a self, ) -> Pin<Box<dyn Future<Output = Result<(Box<dyn TransportSink>, Box<dyn TransportStream>), TransportError>> + Send + 'a>>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§