Trait distant_core::DataStream [−][src]
pub trait DataStream: AsyncRead + AsyncWrite + Unpin {
type Read: AsyncRead + Send + Unpin + 'static;
type Write: AsyncWrite + Send + Unpin + 'static;
fn to_connection_tag(&self) -> String;
fn into_split(self) -> (Self::Read, Self::Write);
}
Expand description
Interface representing a two-way data stream
Enables splitting into separate, functioning halves that can read and write respectively
Associated Types
type Write: AsyncWrite + Send + Unpin + 'static
Required methods
fn to_connection_tag(&self) -> String
fn to_connection_tag(&self) -> String
Returns a textual description of the connection associated with this stream