Skip to main content

MessagePublisher

Trait MessagePublisher 

Source
pub trait MessagePublisher: Send + Sync {
    // Required method
    fn publish<'a>(
        &'a self,
        channel: &'a str,
        body: Vec<u8>,
        headers: HashMap<String, String>,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>;
}
Expand description

Publish messages to channels by name.

Required Methods§

Source

fn publish<'a>( &'a self, channel: &'a str, body: Vec<u8>, headers: HashMap<String, String>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>>

Implementors§