Trait ConnectSvc

Source
pub trait ConnectSvc {
    type Connection: Read + Write + Connection + Unpin + Send + 'static;
    type Error: Into<Box<dyn StdError + Send + Sync>>;
    type Future: Future<Output = Result<Self::Connection, Self::Error>> + Unpin + Send + 'static;

    // Required method
    fn connect(self, internal_only: Internal, dst: Uri) -> Self::Future;
}

Required Associated Types§

Source

type Connection: Read + Write + Connection + Unpin + Send + 'static

Source

type Error: Into<Box<dyn StdError + Send + Sync>>

Source

type Future: Future<Output = Result<Self::Connection, Self::Error>> + Unpin + Send + 'static

Required Methods§

Source

fn connect(self, internal_only: Internal, dst: Uri) -> Self::Future

Implementors§

Source§

impl<S, T> ConnectSvc for S
where S: Service<Uri, Response = T> + Send + 'static, S::Error: Into<Box<dyn StdError + Send + Sync>>, S::Future: Unpin + Send, T: Read + Write + Connection + Unpin + Send + 'static,