pub enum NetworkStream {
Raw {
peer_addr: SocketAddr,
local_addr: SocketAddr,
stream: TcpStream,
},
TlsServer {
peer_addr: SocketAddr,
local_addr: SocketAddr,
stream: TlsStream<TcpStream>,
},
TlsClient {
peer_addr: SocketAddr,
local_addr: SocketAddr,
stream: TlsStream<TcpStream>,
},
}
Expand description
A network data stream which can either be
- unencrypted
- encrypted and the server-side of the session
- encrypted and the client-side of the session
Variants§
Raw
Unencrypted session
TlsServer
Encrypted as the server-side of the session
TlsClient
Encrypted as the client-side of the session
Auto Trait Implementations§
impl !Freeze for NetworkStream
impl !RefUnwindSafe for NetworkStream
impl Send for NetworkStream
impl Sync for NetworkStream
impl Unpin for NetworkStream
impl !UnwindSafe for NetworkStream
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more