ceylon_runtime/core/mesh.rs
1use crate::core::agent::Agent;
2use crate::core::error::Result;
3use crate::core::message::Message;
4use async_trait::async_trait;
5
6#[async_trait]
7pub trait Mesh: Send + Sync {
8 async fn start(&self) -> Result<()>;
9 async fn stop(&self) -> Result<()>;
10 async fn add_agent(&self, agent: Box<dyn Agent + 'static>) -> Result<()>;
11 async fn send(&self, message: Message, target: &str) -> Result<()>;
12}