Skip to main content

BackendAdapter

Trait BackendAdapter 

Source
pub trait BackendAdapter: Send + Sync {
    // Required methods
    fn send_message<'life0, 'life1, 'async_trait>(
        &'life0 self,
        message: &'life1 InboundMessage,
    ) -> Pin<Box<dyn Future<Output = Result<(), BackendError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn supports_files(&self) -> bool;
}
Expand description

Trait for backend adapters

Required Methods§

Source

fn send_message<'life0, 'life1, 'async_trait>( &'life0 self, message: &'life1 InboundMessage, ) -> Pin<Box<dyn Future<Output = Result<(), BackendError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Send a normalized message to the backend

Source

fn supports_files(&self) -> bool

Whether this backend supports file attachments

Implementors§