Agent

Trait Agent 

Source
pub trait Agent {
Show 17 methods // Required methods fn new( askit: ASKit, id: String, def_name: String, configs: Option<AgentConfigs>, ) -> Result<Self, AgentError> where Self: Sized; fn askit(&self) -> &ASKit; fn id(&self) -> &str; fn status(&self) -> &AgentStatus; fn def_name(&self) -> &str; fn out_pin(&self, name: &str) -> Option<&Pin>; fn set_out_pin(&mut self, name: String, value: AgentValue); fn configs(&self) -> Result<&AgentConfigs, AgentError>; fn set_config( &mut self, key: String, value: AgentValue, ) -> Result<(), AgentError>; fn set_configs(&mut self, configs: AgentConfigs) -> Result<(), AgentError>; fn flow_name(&self) -> &str; fn set_flow_name(&mut self, flow_name: String); 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; // Provided methods fn get_global_configs(&self) -> Option<AgentConfigs> { ... } fn runtime(&self) -> &Runtime { ... }
}

Required Methods§

Source

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

Source

fn askit(&self) -> &ASKit

Source

fn id(&self) -> &str

Source

fn status(&self) -> &AgentStatus

Source

fn def_name(&self) -> &str

Source

fn out_pin(&self, name: &str) -> Option<&Pin>

Source

fn set_out_pin(&mut self, name: String, value: AgentValue)

Source

fn configs(&self) -> Result<&AgentConfigs, AgentError>

Source

fn set_config( &mut self, key: String, value: AgentValue, ) -> Result<(), AgentError>

Source

fn set_configs(&mut self, configs: AgentConfigs) -> Result<(), AgentError>

Source

fn flow_name(&self) -> &str

Source

fn set_flow_name(&mut self, flow_name: String)

Source

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,

Source

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,

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

Provided Methods§

Implementors§

Source§

impl<T: AsAgent + Send + Sync> Agent for T