Trait MessageBroker
Source pub trait MessageBroker: Send + Sync {
// Required methods
fn subscribe<'life0, 'async_trait>(
&'life0 self,
names: 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,
names: 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 publish<'life0, 'async_trait>(
&'life0 self,
message: Message,
) -> 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;
}