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]
#[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,
Subscribe to Message
s 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]
#[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,
Unsubscribe from Message
s published to topic
.
#[must_use]fn receiver(&self) -> &Receiver<Arc<Message>>
[src]
#[must_use]
fn receiver(&self) -> &Receiver<Arc<Message>>Returns the receiver to receive Message
s.
Implementations on Foreign Types
impl Subscriber for Subscriber
[src]
impl Subscriber for Subscriber
[src]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]
&'life0 self,
topic: S
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>> where
S: 'async_trait,
'life0: '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>> where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
[src]
&'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,