TelegramProvider

Trait TelegramProvider 

Source
pub trait TelegramProvider: Send + Sync {
    // Required methods
    fn send_message<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        chat_id: &'life1 str,
        text: &'life2 str,
    ) -> Pin<Box<dyn Future<Output = IntegrationResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn send_photo<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        chat_id: &'life1 str,
        photo_path: &'life2 str,
        caption: Option<&'life3 str>,
    ) -> Pin<Box<dyn Future<Output = IntegrationResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn send_document<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        chat_id: &'life1 str,
        file_path: &'life2 str,
        caption: Option<&'life3 str>,
    ) -> Pin<Box<dyn Future<Output = IntegrationResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait;
    fn get_updates<'life0, 'async_trait>(
        &'life0 self,
        offset: Option<i64>,
    ) -> Pin<Box<dyn Future<Output = IntegrationResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn set_webhook<'life0, 'life1, 'async_trait>(
        &'life0 self,
        url: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = IntegrationResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

Telegram provider trait

Required Methods§

Source

fn send_message<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, chat_id: &'life1 str, text: &'life2 str, ) -> Pin<Box<dyn Future<Output = IntegrationResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source

fn send_photo<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, chat_id: &'life1 str, photo_path: &'life2 str, caption: Option<&'life3 str>, ) -> Pin<Box<dyn Future<Output = IntegrationResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source

fn send_document<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, chat_id: &'life1 str, file_path: &'life2 str, caption: Option<&'life3 str>, ) -> Pin<Box<dyn Future<Output = IntegrationResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source

fn get_updates<'life0, 'async_trait>( &'life0 self, offset: Option<i64>, ) -> Pin<Box<dyn Future<Output = IntegrationResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn set_webhook<'life0, 'life1, 'async_trait>( &'life0 self, url: &'life1 str, ) -> Pin<Box<dyn Future<Output = IntegrationResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Implementors§