Trait nemo::Transfers [] [src]

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

An implementation of this trait provides sending and receiving functionality to Channel for an arbitrary T. Channel will only ever call these functions if it expects a T, so long as outside of this trait and IO the backing channel cannot be accessed.

See the explanation on IO for more details.

Required Methods

Sends an object from the handler to the outside channel.

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

Implementors