Trait Socket
pub trait Socket: Send + 'static {
type Read: AsyncRead + Unpin + Send + 'static;
type Write: TryWrite;
// Required method
fn split(self) -> (Self::Read, Self::Write);
}Expand description
A connection the server can serve: read by the connection task, written by whichever thread produced a reply.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".