pub trait DataChannel<T> {
// Required methods
fn send(&self, value: T) -> Result<(), Error>;
fn try_send(&self, value: T) -> Result<(), Error>;
fn recv(&self) -> Result<T, Error>;
fn try_recv(&self) -> Result<T, Error>;
// Provided method
fn is_alive(&self) -> bool { ... }
}Expand description
An abstract trait for data channels and hubs