Trait duplex::Duplex

source ·
pub trait Duplex { }
Expand description

A trait which indicates a type represents a duplex communication channel, meaning it’s bidirectional and may be used in an interactive manner.

For example, TcpStream is Duplex, however File is not, because even though File is readable and writable, normal files do not have independent input and output channels; they share a current-position pointer. CharDevice is a special kind of file which is Duplex.

Types should implment this, and implementations of HalfDuplex and FullDuplex (enabled with the “futures-io” cargo feature) will be provided by blanket implementations.

Implementations on Foreign Types§

source§

impl<R: Read, W: Write> Duplex for ReadWrite<R, W>

source§

impl<R: Read, W: Write> Duplex for Duplex<R, W>

source§

impl Duplex for Channel

source§

impl Duplex for Stream

source§

impl Duplex for TTYPort

source§

impl Duplex for CharDevice

source§

impl Duplex for TcpStream

source§

impl Duplex for SocketpairStream

source§

impl Duplex for UnixStream

Implementors§