ASKit

Struct ASKit 

Source
pub struct ASKit { /* private fields */ }

Implementations§

Source§

impl ASKit

Source

pub fn new() -> Self

Source

pub fn init() -> Result<Self, AgentError>

Source

pub async fn ready(&self) -> Result<(), AgentError>

Source

pub fn quit(&self)

Source

pub fn register_agent(&self, def: AgentDefinition)

Source

pub fn get_agent_definitions(&self) -> AgentDefinitions

Source

pub fn get_agent_definition(&self, def_name: &str) -> Option<AgentDefinition>

Source

pub fn get_agent_default_config( &self, def_name: &str, ) -> Option<AgentDefaultConfig>

Source

pub fn get_agent_flows(&self) -> AgentFlows

Source

pub fn new_agent_flow(&self, name: &str) -> Result<AgentFlow, AgentError>

Source

pub fn rename_agent_flow( &self, old_name: &str, new_name: &str, ) -> Result<String, AgentError>

Source

pub fn unique_flow_name(&self, name: &str) -> String

Source

pub fn add_agent_flow(&self, agent_flow: &AgentFlow) -> Result<(), AgentError>

Source

pub async fn remove_agent_flow(&self, flow_name: &str) -> Result<(), AgentError>

Source

pub fn insert_agent_flow(&self, flow: AgentFlow) -> Result<(), AgentError>

Source

pub fn new_agent_flow_node( &self, def_name: &str, ) -> Result<AgentFlowNode, AgentError>

Source

pub fn add_agent_flow_node( &self, flow_name: &str, node: &AgentFlowNode, ) -> Result<(), AgentError>

Source

pub fn add_agent_flow_edge( &self, flow_name: &str, edge: &AgentFlowEdge, ) -> Result<(), AgentError>

Source

pub async fn remove_agent_flow_node( &self, flow_name: &str, node_id: &str, ) -> Result<(), AgentError>

Source

pub fn remove_agent_flow_edge( &self, flow_name: &str, edge_id: &str, ) -> Result<(), AgentError>

Source

pub fn copy_sub_flow( &self, nodes: &Vec<AgentFlowNode>, edges: &Vec<AgentFlowEdge>, ) -> (Vec<AgentFlowNode>, Vec<AgentFlowEdge>)

Source

pub async fn start_agent_flow(&self, name: &str) -> Result<(), AgentError>

Source

pub async fn stop_agent_flow(&self, name: &str) -> Result<(), AgentError>

Source

pub async fn start_agent(&self, agent_id: &str) -> Result<(), AgentError>

Source

pub async fn stop_agent(&self, agent_id: &str) -> Result<(), AgentError>

Source

pub async fn set_agent_config( &self, agent_id: String, config: AgentConfig, ) -> Result<(), AgentError>

Source

pub fn get_global_config(&self, def_name: &str) -> Option<AgentConfig>

Source

pub fn set_global_config(&self, def_name: String, config: AgentConfig)

Source

pub fn set_global_configs(&self, new_configs: AgentConfigs)

Source

pub fn get_global_configs(&self) -> AgentConfigs

Source

pub async fn send_agent_out( &self, agent_id: String, ctx: AgentContext, data: AgentData, ) -> Result<(), AgentError>

Source

pub fn try_send_agent_out( &self, agent_id: String, ctx: AgentContext, data: AgentData, ) -> Result<(), AgentError>

Source

pub fn write_board_data( &self, name: String, data: AgentData, ) -> Result<(), AgentError>

Source

pub fn subscribe(&self, observer: Box<dyn ASKitObserver + Sync + Send>) -> usize

Source

pub fn unsubscribe(&self, observer_id: usize)

Trait Implementations§

Source§

impl Clone for ASKit

Source§

fn clone(&self) -> ASKit

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl Freeze for ASKit

§

impl RefUnwindSafe for ASKit

§

impl Send for ASKit

§

impl Sync for ASKit

§

impl Unpin for ASKit

§

impl UnwindSafe for ASKit

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.