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§
Sourcefn 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 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
Sourcefn config(&self) -> &AgentConfig
fn config(&self) -> &AgentConfig
Get the agent’s configuration
Sourcefn agent_type(&self) -> &str
fn agent_type(&self) -> &str
Get the agent’s name/type
Sourcefn set_trajectory_recorder(&mut self, recorder: TrajectoryRecorder)
fn set_trajectory_recorder(&mut self, recorder: TrajectoryRecorder)
Set the trajectory recorder
Sourcefn trajectory_recorder(&self) -> Option<&TrajectoryRecorder>
fn trajectory_recorder(&self) -> Option<&TrajectoryRecorder>
Get the trajectory recorder