Higher level communication abstractions.

Struct 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.

Implementation of GenericChan<T> for DuplexStream<T, U>

Method send

fn send(x: T)

Implementation of GenericSmartChan<T> for DuplexStream<T, U>

Method try_send

fn try_send(x: T) -> bool

Implementation of GenericPort<U> for DuplexStream<T, U>

Method recv

fn recv() -> U

Method try_recv

fn try_recv() -> Option<U>

Implementation of Peekable<U> for DuplexStream<T, U>

Method peek

fn peek() -> bool

Implementation of Selectable for DuplexStream<T, U>

Method header

fn header() -> *pipes::PacketHeader

Function DuplexStream

fn DuplexStream<T: Owned, U: Owned>() ->
 (DuplexStream<T, U>, DuplexStream<U, T>)

Creates a bidirectional stream.