Trait MessageCenter

Source
pub trait MessageCenter: Send + Sync {
    // Required methods
    fn subscribe<'life0, 'async_trait>(
        &'life0 self,
        topics: Vec<String>,
        qos: Qos,
    ) -> Pin<Box<dyn Future<Output = R<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn unsubscribe<'life0, 'async_trait>(
        &'life0 self,
        topics: Vec<String>,
    ) -> Pin<Box<dyn Future<Output = R<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn listen<'life0, 'async_trait>(
        &'life0 self,
        handler: Arc<dyn Fn(Message) -> R<()> + Send + Sync>,
    ) -> Pin<Box<dyn Future<Output = R<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn shutdown<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = R<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn publish<'life0, 'async_trait>(
        &'life0 self,
        qos: Qos,
        retain: bool,
        message: Message,
    ) -> Pin<Box<dyn Future<Output = R<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn publish_delay<'life0, 'async_trait>(
        &'life0 self,
        qos: Qos,
        retain: bool,
        message: Message,
    ) -> Pin<Box<dyn Future<Output = R<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn subscribe<'life0, 'async_trait>( &'life0 self, topics: Vec<String>, qos: Qos, ) -> Pin<Box<dyn Future<Output = R<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn unsubscribe<'life0, 'async_trait>( &'life0 self, topics: Vec<String>, ) -> Pin<Box<dyn Future<Output = R<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn listen<'life0, 'async_trait>( &'life0 self, handler: Arc<dyn Fn(Message) -> R<()> + Send + Sync>, ) -> Pin<Box<dyn Future<Output = R<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn shutdown<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = R<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn publish<'life0, 'async_trait>( &'life0 self, qos: Qos, retain: bool, message: Message, ) -> Pin<Box<dyn Future<Output = R<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn publish_delay<'life0, 'async_trait>( &'life0 self, qos: Qos, retain: bool, message: Message, ) -> Pin<Box<dyn Future<Output = R<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§