Trait Runtime
Source pub trait Runtime:
Send
+ Sync
+ 'static
+ Debug {
// Required methods
fn id(&self) -> RuntimeID;
fn send_message<'life0, 'async_trait>(
&'life0 self,
message: String,
agent_id: AgentID,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn publish_message<'life0, 'async_trait>(
&'life0 self,
message: String,
topic: String,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn subscribe<'life0, 'async_trait>(
&'life0 self,
agent_id: AgentID,
topic: String,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn register_agent<'life0, 'async_trait>(
&'life0 self,
agent: Arc<dyn RunnableAgent>,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn take_event_receiver<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Option<ReceiverStream<Event>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn run<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn stop<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}