siera_agent/modules/basic_message.rs
1use crate::error::Result;
2use async_trait::async_trait;
3
4/// Options that are supplied when sending a basic message to another agent
5pub struct SendBasicMessageOptions {
6 /// The connection id to which to send the message
7 pub connection_id: String,
8
9 /// A simple text message
10 pub message: String,
11}
12
13/// Generic cloudagent basic message module
14#[async_trait]
15pub trait BasicMessageModule {
16 /// Send a basic message to another agent via the connection id
17 async fn send_message(&self, options: SendBasicMessageOptions) -> Result<()>;
18}