Trait Transport

Source
pub trait Transport:
    Send
    + Sync
    + 'static {
    // Required methods
    fn send(&self, message: &Message) -> Result<()>;
    fn receive(&self) -> Result<Message>;
    fn open(&self) -> Result<()>;
    fn close(&self) -> Result<()>;
}

Required Methods§

Source

fn send(&self, message: &Message) -> Result<()>

Send a message to the transport

Source

fn receive(&self) -> Result<Message>

Receive a message from the transport this is blocking call

Source

fn open(&self) -> Result<()>

open the transport

Source

fn close(&self) -> Result<()>

Close the transport

Implementors§