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 { ... }
}Required Methods§
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,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".