pub struct TeamsMessenger { /* private fields */ }Expand description
Microsoft Teams messenger using webhooks / Bot Framework.
Implementations§
Source§impl TeamsMessenger
impl TeamsMessenger
pub fn new(name: String) -> Self
Sourcepub fn with_webhook_url(self, url: String) -> Self
pub fn with_webhook_url(self, url: String) -> Self
Set the incoming webhook URL.
Sourcepub fn with_bot_framework(self, app_id: String, app_password: String) -> Self
pub fn with_bot_framework(self, app_id: String, app_password: String) -> Self
Set Bot Framework credentials.
Trait Implementations§
Source§impl Messenger for TeamsMessenger
impl Messenger for TeamsMessenger
Source§fn messenger_type(&self) -> &str
fn messenger_type(&self) -> &str
Get the messenger type (telegram, discord, signal, matrix, etc.)
Source§fn initialize<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn initialize<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Initialize the messenger (connect, authenticate, etc.)
Source§fn send_message<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_channel: &'life1 str,
content: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn send_message<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_channel: &'life1 str,
content: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Send a message to a recipient/channel
Source§fn send_message_with_options<'life0, 'life1, 'async_trait>(
&'life0 self,
opts: SendOptions<'life1>,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn send_message_with_options<'life0, 'life1, 'async_trait>(
&'life0 self,
opts: SendOptions<'life1>,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Send a message with additional options
Source§fn receive_messages<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Message>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn receive_messages<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Message>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Receive pending messages (non-blocking poll)
Source§fn is_connected(&self) -> bool
fn is_connected(&self) -> bool
Check if the messenger is connected
Auto Trait Implementations§
impl Freeze for TeamsMessenger
impl !RefUnwindSafe for TeamsMessenger
impl Send for TeamsMessenger
impl Sync for TeamsMessenger
impl Unpin for TeamsMessenger
impl UnsafeUnpin for TeamsMessenger
impl !UnwindSafe for TeamsMessenger
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more