Higher level communication abstractions.
DuplexStream
- An extension of pipes::stream
that allows both sending and receiving.of GenericChan<T> for DuplexStream<T, U>
of GenericSmartChan<T> for DuplexStream<T, U>
of GenericPort<U> for DuplexStream<T, U>
of Peekable<U> for DuplexStream<T, U>
of Selectable for DuplexStream<T, U>
DuplexStream
- Creates a bidirectional stream.DuplexStream
pub struct DuplexStream <T: Owned, U: Owned>{
priv chan: Chan<T>,
priv port: Port<U>,
}
An extension of pipes::stream
that allows both sending and receiving.
GenericChan<T>
for DuplexStream<T, U>
send
fn send(x: T)
GenericSmartChan<T>
for DuplexStream<T, U>
try_send
fn try_send(x: T) -> bool
GenericPort<U>
for DuplexStream<T, U>
recv
fn recv() -> U
try_recv
fn try_recv() -> Option<U>
Peekable<U>
for DuplexStream<T, U>
peek
fn peek() -> bool
Selectable
for DuplexStream<T, U>
header
fn header() -> *pipes::PacketHeader
DuplexStream
fn DuplexStream<T: Owned, U: Owned>() ->
(DuplexStream<T, U>, DuplexStream<U, T>)
Creates a bidirectional stream.