Trait nemo::IO [] [src]

pub trait IO<T> {
    fn send(&mut self, T);
    fn recv(&mut self) -> Option<T>;
    fn close(&mut self);
}

This trait describes a backend for a channel to expose a message passing interface.

Required Methods

fn send(&mut self, T)

Sends an object from the handler to the outside channel.

fn recv(&mut self) -> Option<T>

Attempts to retrieve an object from the outside channel. This can block but it also might not, depending on the impl.

fn close(&mut self)

Closes the channel.

Implementors