AsAgent

Trait AsAgent 

Source
pub trait AsAgent: HasAgentData {
    // Required method
    fn new(
        askit: ASKit,
        id: String,
        def_name: String,
        configs: Option<AgentConfigs>,
    ) -> Result<Self, AgentError>
       where Self: Sized + Send + Sync;

    // 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: Send + '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: Send + '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: Send + 'async_trait,
             'life0: 'async_trait { ... }
}

Required Methods§

Source

fn new( askit: ASKit, id: String, def_name: String, configs: Option<AgentConfigs>, ) -> Result<Self, AgentError>
where Self: Sized + Send + Sync,

Provided Methods§

Source

fn configs_changed(&mut self) -> Result<(), AgentError>

Source

fn start<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), AgentError>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait,

Source

fn stop<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<(), AgentError>> + Send + 'async_trait>>
where Self: Send + 'async_trait, 'life0: 'async_trait,

Source

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: Send + 'async_trait, 'life0: 'async_trait,

Implementors§