Agent

Trait Agent 

Source
pub trait Agent: Send + Sync {
    // Required methods
    fn execute_task<'life0, 'life1, 'async_trait>(
        &'life0 mut self,
        task: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = AgentResult<AgentExecution>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn config(&self) -> &AgentConfig;
    fn agent_type(&self) -> &str;
    fn set_trajectory_recorder(&mut self, recorder: TrajectoryRecorder);
    fn trajectory_recorder(&self) -> Option<&TrajectoryRecorder>;
}
Expand description

Base trait for all agents

Required Methods§

Source

fn execute_task<'life0, 'life1, 'async_trait>( &'life0 mut self, task: &'life1 str, ) -> Pin<Box<dyn Future<Output = AgentResult<AgentExecution>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Execute a task

Source

fn config(&self) -> &AgentConfig

Get the agent’s configuration

Source

fn agent_type(&self) -> &str

Get the agent’s name/type

Source

fn set_trajectory_recorder(&mut self, recorder: TrajectoryRecorder)

Set the trajectory recorder

Source

fn trajectory_recorder(&self) -> Option<&TrajectoryRecorder>

Get the trajectory recorder

Implementors§