Trait Subscriber

Source
pub trait Subscriber: Send + Sync {
    // Required method
    fn recv(
        &mut self,
    ) -> Result<Option<Box<dyn ReceivedSample>>, Box<dyn Error + Send + Sync + 'static>>;
}
Expand description

Allows receiving messages published on a topic.

Required Methods§

Source

fn recv( &mut self, ) -> Result<Option<Box<dyn ReceivedSample>>, Box<dyn Error + Send + Sync + 'static>>

Receives the next message.

Blocks until the next message is available.

Depending on the chosen communication backend, some messages might be dropped if the publisher is faster than the subscriber.

Implementors§