pub trait MakeConnection<Target>: Sealed<(Target,)> {
    type Connection: AsyncRead + AsyncWrite;
    type Error;
    type Future: Future<Output = Result<Self::Connection, Self::Error>>;

    // Required methods
    fn poll_ready(
        &mut self,
        cx: &mut Context<'_>
    ) -> Poll<Result<(), Self::Error>>;
    fn make_connection(&mut self, target: Target) -> Self::Future;
}

Required Associated Types§

Required Methods§

source

fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>

source

fn make_connection(&mut self, target: Target) -> Self::Future

Implementors§

source§

impl<S, Target> MakeConnection<Target> for Swhere S: Service<Target>, S::Response: AsyncRead + AsyncWrite,

§

type Connection = <S as Service<Target>>::Response

§

type Error = <S as Service<Target>>::Error

§

type Future = <S as Service<Target>>::Future