pub trait ChannelAdapter: Send + Sync {
// Required methods
fn name(&self) -> &str;
fn display_name(&self) -> &str;
fn supports_threads(&self) -> bool;
fn supports_media(&self) -> bool;
fn start<'life0, 'async_trait>(
&'life0 self,
host: Arc<dyn ChannelAdapterHost>,
cancel: CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<(), PluginError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn send<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
target: &'life1 str,
payload: &'life2 MessagePayload,
) -> Pin<Box<dyn Future<Output = Result<String, PluginError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
A channel adapter for connecting to external messaging platforms.
Replaces the existing Channel trait with a plugin-oriented design
that supports MessagePayload variants for text, structured, and
binary (voice) content.
Required Methods§
Sourcefn display_name(&self) -> &str
fn display_name(&self) -> &str
Human-readable display name.
Sourcefn supports_threads(&self) -> bool
fn supports_threads(&self) -> bool
Whether this adapter supports threaded conversations.
Sourcefn supports_media(&self) -> bool
fn supports_media(&self) -> bool
Whether this adapter supports media/binary payloads.
Sourcefn start<'life0, 'async_trait>(
&'life0 self,
host: Arc<dyn ChannelAdapterHost>,
cancel: CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<(), PluginError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn start<'life0, 'async_trait>(
&'life0 self,
host: Arc<dyn ChannelAdapterHost>,
cancel: CancellationToken,
) -> Pin<Box<dyn Future<Output = Result<(), PluginError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Start receiving messages. Long-lived – runs until cancelled.
Sourcefn send<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
target: &'life1 str,
payload: &'life2 MessagePayload,
) -> Pin<Box<dyn Future<Output = Result<String, PluginError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn send<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
target: &'life1 str,
payload: &'life2 MessagePayload,
) -> Pin<Box<dyn Future<Output = Result<String, PluginError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Send a message payload through this channel.
Returns a message ID on success.