mirror of
https://github.com/fafhrd91/actix-net
synced 2024-11-27 18:02:58 +01:00
fix feature gated code
This commit is contained in:
parent
dfbb77f98d
commit
aa2967c653
@ -26,8 +26,7 @@ impl<R, T, E> OpensslConnector<R, T, E> {
|
||||
impl<R: RequestHost, T: AsyncRead + AsyncWrite> OpensslConnector<R, T, ()> {
|
||||
pub fn service(
|
||||
connector: SslConnector,
|
||||
) -> impl Service<Request = (R, T), Response = (R, SslStream<T>), Error = HandshakeError<T>>
|
||||
{
|
||||
) -> impl Service<(R, T), Response = (R, SslStream<T>), Error = HandshakeError<T>> {
|
||||
OpensslConnectorService {
|
||||
connector: connector,
|
||||
_t: PhantomData,
|
||||
@ -44,10 +43,9 @@ impl<R, T, E> Clone for OpensslConnector<R, T, E> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<R: RequestHost, T: AsyncRead + AsyncWrite, E> NewService<()>
|
||||
impl<R: RequestHost, T: AsyncRead + AsyncWrite, E> NewService<(R, T), ()>
|
||||
for OpensslConnector<R, T, E>
|
||||
{
|
||||
type Request = (R, T);
|
||||
type Response = (R, SslStream<T>);
|
||||
type Error = HandshakeError<T>;
|
||||
type Service = OpensslConnectorService<R, T>;
|
||||
@ -67,8 +65,9 @@ pub struct OpensslConnectorService<R, T> {
|
||||
_t: PhantomData<(R, T)>,
|
||||
}
|
||||
|
||||
impl<R: RequestHost, T: AsyncRead + AsyncWrite> Service for OpensslConnectorService<R, T> {
|
||||
type Request = (R, T);
|
||||
impl<R: RequestHost, T: AsyncRead + AsyncWrite> Service<(R, T)>
|
||||
for OpensslConnectorService<R, T>
|
||||
{
|
||||
type Response = (R, SslStream<T>);
|
||||
type Error = HandshakeError<T>;
|
||||
type Future = ConnectAsyncExt<R, T>;
|
||||
|
@ -36,8 +36,7 @@ impl<T: AsyncRead + AsyncWrite> Clone for NativeTlsAcceptor<T> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: AsyncRead + AsyncWrite> NewService for NativeTlsAcceptor<T> {
|
||||
type Request = T;
|
||||
impl<T: AsyncRead + AsyncWrite> NewService<T> for NativeTlsAcceptor<T> {
|
||||
type Response = TlsStream<T>;
|
||||
type Error = Error;
|
||||
type Service = NativeTlsAcceptorService<T>;
|
||||
@ -61,8 +60,7 @@ pub struct NativeTlsAcceptorService<T> {
|
||||
conns: Counter,
|
||||
}
|
||||
|
||||
impl<T: AsyncRead + AsyncWrite> Service for NativeTlsAcceptorService<T> {
|
||||
type Request = T;
|
||||
impl<T: AsyncRead + AsyncWrite> Service<T> for NativeTlsAcceptorService<T> {
|
||||
type Response = TlsStream<T>;
|
||||
type Error = Error;
|
||||
type Future = Accept<T>;
|
||||
|
@ -36,8 +36,7 @@ impl<T: AsyncRead + AsyncWrite> Clone for OpensslAcceptor<T> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: AsyncRead + AsyncWrite> NewService for OpensslAcceptor<T> {
|
||||
type Request = T;
|
||||
impl<T: AsyncRead + AsyncWrite> NewService<T> for OpensslAcceptor<T> {
|
||||
type Response = SslStream<T>;
|
||||
type Error = HandshakeError<T>;
|
||||
type Service = OpensslAcceptorService<T>;
|
||||
@ -61,8 +60,7 @@ pub struct OpensslAcceptorService<T> {
|
||||
conns: Counter,
|
||||
}
|
||||
|
||||
impl<T: AsyncRead + AsyncWrite> Service for OpensslAcceptorService<T> {
|
||||
type Request = T;
|
||||
impl<T: AsyncRead + AsyncWrite> Service<T> for OpensslAcceptorService<T> {
|
||||
type Response = SslStream<T>;
|
||||
type Error = HandshakeError<T>;
|
||||
type Future = OpensslAcceptorServiceFut<T>;
|
||||
|
@ -38,8 +38,7 @@ impl<T> Clone for RustlsAcceptor<T> {
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: AsyncRead + AsyncWrite> NewService for RustlsAcceptor<T> {
|
||||
type Request = T;
|
||||
impl<T: AsyncRead + AsyncWrite> NewService<T> for RustlsAcceptor<T> {
|
||||
type Response = TlsStream<T, ServerSession>;
|
||||
type Error = io::Error;
|
||||
type Service = RustlsAcceptorService<T>;
|
||||
@ -63,8 +62,7 @@ pub struct RustlsAcceptorService<T> {
|
||||
conns: Counter,
|
||||
}
|
||||
|
||||
impl<T: AsyncRead + AsyncWrite> Service for RustlsAcceptorService<T> {
|
||||
type Request = T;
|
||||
impl<T: AsyncRead + AsyncWrite> Service<T> for RustlsAcceptorService<T> {
|
||||
type Response = TlsStream<T, ServerSession>;
|
||||
type Error = io::Error;
|
||||
type Future = RustlsAcceptorServiceFut<T>;
|
||||
|
Loading…
Reference in New Issue
Block a user