Trait AsAgent
Source pub trait AsAgent {
// Required methods
fn new(
askit: ASKit,
id: String,
def_name: String,
configs: Option<AgentConfigs>,
) -> Result<Self, AgentError>
where Self: Sized + Send + Sync;
fn data(&self) -> &AsAgentData;
fn mut_data(&mut self) -> &mut AsAgentData;
// Provided methods
fn configs_changed(&mut self) -> Result<(), AgentError> { ... }
fn start(&mut self) -> Result<(), AgentError> { ... }
fn stop(&mut self) -> Result<(), AgentError> { ... }
fn process<'life0, 'async_trait>(
&'life0 mut self,
_ctx: AgentContext,
_pin: String,
_data: AgentData,
) -> Pin<Box<dyn Future<Output = Result<(), AgentError>> + Send + 'async_trait>>
where Self: Send + 'async_trait,
'life0: 'async_trait { ... }
}