Trait AsAgent
Source pub trait AsAgent:
HasAgentData
+ Send
+ Sync
+ 'static {
// Required method
fn new(
askit: ASKit,
id: String,
spec: AgentSpec,
) -> Result<Self, AgentError>
where Self: Sized;
// Provided methods
fn configs_changed(&mut self) -> Result<(), AgentError> { ... }
fn start<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), AgentError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn stop<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<(), AgentError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn process<'life0, 'async_trait>(
&'life0 mut self,
_ctx: AgentContext,
_pin: String,
_value: AgentValue,
) -> Pin<Box<dyn Future<Output = Result<(), AgentError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}