pub struct ChannelManager<B> { /* private fields */ }Expand description
Backend-free operations plus backend delegation for runtime effects.
Implementations§
Source§impl<B> ChannelManager<B>
impl<B> ChannelManager<B>
pub fn new(config: ChannelsConfig, backend: B) -> Self
pub fn config(&self) -> &ChannelsConfig
pub fn config_mut(&mut self) -> &mut ChannelsConfig
pub fn backend(&self) -> &B
pub fn list_definitions(&self) -> Vec<ChannelDefinition>
pub fn describe(&self, channel: &str) -> Option<ChannelDefinition>
Source§impl<B: ChannelBackend> ChannelManager<B>
impl<B: ChannelBackend> ChannelManager<B>
pub async fn connect( &self, channel: &str, auth_mode: ChannelAuthMode, credentials: Value, ) -> Result<ChannelConnectionResult>
pub async fn disconnect( &self, channel: &str, auth_mode: ChannelAuthMode, clear_memory: bool, ) -> Result<ChannelDisconnectResult>
pub async fn status( &self, channel: Option<&str>, ) -> Result<Vec<ChannelStatusEntry>>
pub async fn test( &self, channel: &str, auth_mode: ChannelAuthMode, credentials: Value, ) -> Result<ChannelTestResult>
pub async fn send_message( &self, channel: &str, message: SendMessage, ) -> Result<ChannelSendMessageResult>
pub async fn send_message_value( &self, channel: &str, message: Value, ) -> Result<ChannelSendMessageResult>
pub async fn send_outbound_intent( &self, intent: ChannelOutboundIntent, ) -> Result<ChannelSendMessageResult>
pub async fn send_reaction( &self, channel: &str, reaction: Value, ) -> Result<ChannelReactionResult>
pub async fn create_thread( &self, channel: &str, title: &str, ) -> Result<ChannelThreadResult>
pub async fn update_thread( &self, channel: &str, thread_id: &str, action: &str, ) -> Result<ChannelThreadResult>
pub async fn list_threads( &self, channel: &str, active: Option<bool>, ) -> Result<ChannelThreadListResult>
pub async fn telegram_login_start(&self) -> Result<TelegramLoginStartResult>
pub async fn telegram_login_check( &self, link_token: &str, ) -> Result<TelegramLoginCheckResult>
pub async fn discord_link_start(&self) -> Result<DiscordLinkStartResult>
pub async fn discord_link_check( &self, link_token: &str, ) -> Result<DiscordLinkCheckResult>
pub async fn discord_list_guilds(&self) -> Result<DiscordGuildListResult>
pub async fn discord_list_channels( &self, guild_id: &str, ) -> Result<DiscordChannelListResult>
pub async fn discord_check_permissions( &self, guild_id: &str, channel_id: &str, ) -> Result<DiscordPermissionCheckResult>
pub async fn set_default_channel(&self, channel: &str) -> Result<()>
pub async fn get_default_channel(&self) -> Result<Option<String>>
Auto Trait Implementations§
impl<B> Freeze for ChannelManager<B>where
B: Freeze,
impl<B> RefUnwindSafe for ChannelManager<B>where
B: RefUnwindSafe,
impl<B> Send for ChannelManager<B>where
B: Send,
impl<B> Sync for ChannelManager<B>where
B: Sync,
impl<B> Unpin for ChannelManager<B>where
B: Unpin,
impl<B> UnsafeUnpin for ChannelManager<B>where
B: UnsafeUnpin,
impl<B> UnwindSafe for ChannelManager<B>where
B: UnwindSafe,
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