pub trait Subscriber {
    fn subscribe_to<'life0, 'async_trait, S>(
        &'life0 self,
        topic: S
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>
    where
        'life0: 'async_trait,
        S: Into<String> + Send + 'async_trait,
        Self: 'async_trait
;
fn unsubscribe_from<'life0, 'life1, 'async_trait>(
        &'life0 self,
        topic: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait, Global>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
;
fn receiver(&self) -> &Receiver<Arc<Message>>; }
Expand description

A subscriber to one or more topics.

Required methods

Subscribe to Messages published to topic.

Unsubscribe from Messages published to topic.

Returns the receiver to receive Messages.

Implementors