pub struct GoogleChatMessenger { /* private fields */ }Expand description
Google Chat messenger using webhooks and/or Chat API.
Implementations§
Source§impl GoogleChatMessenger
impl GoogleChatMessenger
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_credentials(self, path: String) -> Self
pub fn with_credentials(self, path: String) -> Self
Set the service account credentials path.
Sourcepub fn with_spaces(self, spaces: Vec<String>) -> Self
pub fn with_spaces(self, spaces: Vec<String>) -> Self
Set spaces to listen on.
Trait Implementations§
Source§impl Messenger for GoogleChatMessenger
impl Messenger for GoogleChatMessenger
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,
space: &'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,
space: &'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 GoogleChatMessenger
impl !RefUnwindSafe for GoogleChatMessenger
impl Send for GoogleChatMessenger
impl Sync for GoogleChatMessenger
impl Unpin for GoogleChatMessenger
impl UnsafeUnpin for GoogleChatMessenger
impl !UnwindSafe for GoogleChatMessenger
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