Message passing

Struct Chan

pub struct Chan<T> {
    x: rtcomm::Chan<T>,
}

Struct ChanOne

pub struct ChanOne<T> {
    x: rtcomm::ChanOne<T>,
}

Struct Port

pub struct Port<T> {
    x: rtcomm::Port<T>,
}

Struct PortOne

pub struct PortOne<T> {
    x: rtcomm::PortOne<T>,
}

Struct SharedChan

pub struct SharedChan<T> {
    x: rtcomm::SharedChan<T>,
}

Trait GenericChan

A trait for things that can send multiple messages.

Method send

fn send(&self, x: T)

Sends a message.

Trait GenericPort

A trait for things that can receive multiple messages.

Method recv

fn recv(&self) -> T

Receives a message, or fails if the connection closes.

Method try_recv

fn try_recv(&self) -> Option<T>

Receives a message, or returns none if the connection is closed or closes.

Trait GenericSmartChan

Things that can send multiple messages and can detect when the receiver is closed

Method try_send

fn try_send(&self, x: T) -> bool

Sends a message, or report if the receiver has closed the connection.

Trait Peekable

Ports that can peek

Method peek

fn peek(&self) -> bool

Returns true if a message is available

Implementation for SharedChan<T> where <T: Send>

Method new

fn new(c: Chan<T>) -> SharedChan<T>

Implementation for ChanOne<T> where <T: Send>

Method send

fn send(self, val: T)

Method try_send

fn try_send(self, val: T) -> bool

Method send_deferred

fn send_deferred(self, val: T)

Method try_send_deferred

fn try_send_deferred(self, val: T) -> bool

Implementation for PortOne<T> where <T: Send>

Method recv

fn recv(self) -> T

Method try_recv

fn try_recv(self) -> Option<T>

Implementation of Peekable<T> for PortOne<T> where <T: Send>

Method peek

fn peek(&self) -> bool

Implementation of GenericChan<T> for Chan<T> where <T: Send>

Method send

fn send(&self, val: T)

Implementation of GenericSmartChan<T> for Chan<T> where <T: Send>

Method try_send

fn try_send(&self, val: T) -> bool

Implementation of SendDeferred<T> for Chan<T> where <T: Send>

Method send_deferred

fn send_deferred(&self, val: T)

Method try_send_deferred

fn try_send_deferred(&self, val: T) -> bool

Implementation of GenericPort<T> for Port<T> where <T: Send>

Method recv

fn recv(&self) -> T

Method try_recv

fn try_recv(&self) -> Option<T>

Implementation of Peekable<T> for Port<T> where <T: Send>

Method peek

fn peek(&self) -> bool

Implementation of GenericChan<T> for SharedChan<T> where <T: Send>

Method send

fn send(&self, val: T)

Implementation of GenericSmartChan<T> for SharedChan<T> where <T: Send>

Method try_send

fn try_send(&self, val: T) -> bool

Implementation of SendDeferred<T> for SharedChan<T> where <T: Send>

Method send_deferred

fn send_deferred(&self, val: T)

Method try_send_deferred

fn try_send_deferred(&self, val: T) -> bool

Implementation of Clone for SharedChan<T> where <T>

Method clone

fn clone(&self) -> SharedChan<T>

Function oneshot

fn oneshot<T: Send>() -> (PortOne<T>, ChanOne<T>)

Function stream

fn stream<T: Send>() -> (Port<T>, Chan<T>)