Trait pliantdb_core::pubsub::Subscriber[][src]

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

A subscriber to one or more topics.

Required methods

#[must_use]
fn subscribe_to<'life0, 'async_trait, S: Into<String> + Send>(
    &'life0 self,
    topic: S
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
    S: 'async_trait,
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Subscribe to Messages published to topic.

#[must_use]
fn unsubscribe_from<'life0, 'life1, 'async_trait>(
    &'life0 self,
    topic: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
    'life0: 'async_trait,
    'life1: 'async_trait,
    Self: 'async_trait, 
[src]

Unsubscribe from Messages published to topic.

#[must_use]
fn receiver(&self) -> &Receiver<Arc<Message>>
[src]

Returns the receiver to receive Messages.

Loading content...

Implementations on Foreign Types

impl Subscriber for Subscriber[src]

Loading content...

Implementors

Loading content...