Trait NetworkConnector

Source
pub trait NetworkConnector:
    Send
    + Sync
    + 'static {
    // Required method
    fn connect(
        &self,
        uri: Uri,
    ) -> Pin<Box<dyn Future<Output = Result<NetworkConnection, Box<dyn StdError + Send + Sync>>> + Send>>;
}
Expand description

Network connector trait with type erasure

Required Methods§

Source

fn connect( &self, uri: Uri, ) -> Pin<Box<dyn Future<Output = Result<NetworkConnection, Box<dyn StdError + Send + Sync>>> + Send>>

Implementors§

Source§

impl NetworkConnector for HttpConnector

Source§

impl<S, T> NetworkConnector for HyperConnectorAdapter<S>
where S: Service<Uri, Response = T> + Send + 'static, S::Error: Into<Box<dyn StdError + Send + Sync>>, S::Future: Unpin + Send, T: AsyncRead + AsyncWrite + Connection + Unpin + Send + 'static,