Duplex

Trait 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 Duplex for TcpStream

Source§

impl Duplex for UnixStream

Available on Unix only.
Source§

impl Duplex for CharDevice

Available on crate feature char-device only.
Source§

impl Duplex for TTYPort

Available on Unix and crate feature serialport only.
Source§

impl Duplex for SocketpairStream

Available on crate feature socketpair only.
Source§

impl Duplex for Channel

Available on crate feature ssh2 only.
Source§

impl Duplex for Stream

Available on crate feature ssh2 only.
Source§

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

Available on crate feature duplexify only.
Source§

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

Available on crate feature readwrite only.

Implementors§