1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use mio::net::TcpStream;
use mio::Evented;
use std::io::{Read, Write};
use crate::Result;
pub(crate) trait HandshakeStream: Evented + Send + 'static {
type Stream: IoStream;
fn progress_handshake(&mut self) -> Result<Option<Self::Stream>>;
}
pub trait IoStream: Read + Write + Evented + Send + 'static {}
impl IoStream for TcpStream {}
#[cfg(feature = "native-tls")]
mod native_tls;
#[cfg(feature = "native-tls")]
pub use self::native_tls::TlsConnector;