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§
Sourcefn recv(
&mut self,
) -> Result<Option<Box<dyn ReceivedSample>>, Box<dyn Error + Send + Sync + 'static>>
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.