pub struct ASKit { /* private fields */ }Implementations§
Source§impl ASKit
impl ASKit
pub fn new() -> Self
pub fn init() -> Result<Self, AgentError>
pub async fn ready(&self) -> Result<(), AgentError>
pub fn quit(&self)
pub fn register_agent(&self, def: AgentDefinition)
pub fn get_agent_definitions(&self) -> AgentDefinitions
pub fn get_agent_definition(&self, def_name: &str) -> Option<AgentDefinition>
pub fn get_agent_default_configs( &self, def_name: &str, ) -> Option<AgentDefaultConfigs>
pub fn get_agent_flows(&self) -> AgentFlows
pub fn new_agent_flow(&self, name: &str) -> Result<AgentFlow, AgentError>
pub fn rename_agent_flow( &self, old_name: &str, new_name: &str, ) -> Result<String, AgentError>
pub fn unique_flow_name(&self, name: &str) -> String
pub fn add_agent_flow(&self, agent_flow: &AgentFlow) -> Result<(), AgentError>
pub async fn remove_agent_flow(&self, flow_name: &str) -> Result<(), AgentError>
pub fn insert_agent_flow(&self, flow: AgentFlow) -> Result<(), AgentError>
pub fn new_agent_flow_node( &self, def_name: &str, ) -> Result<AgentFlowNode, AgentError>
pub fn add_agent_flow_node( &self, flow_name: &str, node: &AgentFlowNode, ) -> Result<(), AgentError>
pub fn add_agent_flow_edge( &self, flow_name: &str, edge: &AgentFlowEdge, ) -> Result<(), AgentError>
pub async fn remove_agent_flow_node( &self, flow_name: &str, node_id: &str, ) -> Result<(), AgentError>
pub fn remove_agent_flow_edge( &self, flow_name: &str, edge_id: &str, ) -> Result<(), AgentError>
pub fn copy_sub_flow( &self, nodes: &Vec<AgentFlowNode>, edges: &Vec<AgentFlowEdge>, ) -> (Vec<AgentFlowNode>, Vec<AgentFlowEdge>)
pub async fn start_agent_flow(&self, name: &str) -> Result<(), AgentError>
pub async fn stop_agent_flow(&self, name: &str) -> Result<(), AgentError>
pub async fn start_agent(&self, agent_id: &str) -> Result<(), AgentError>
pub async fn stop_agent(&self, agent_id: &str) -> Result<(), AgentError>
pub async fn set_agent_configs( &self, agent_id: String, configs: AgentConfigs, ) -> Result<(), AgentError>
pub fn get_global_configs(&self, def_name: &str) -> Option<AgentConfigs>
pub fn set_global_configs(&self, def_name: String, configs: AgentConfigs)
pub fn set_global_configs_map(&self, new_configs_map: AgentConfigsMap)
pub fn get_global_configs_map(&self) -> AgentConfigsMap
pub async fn send_agent_out( &self, agent_id: String, ctx: AgentContext, pin: String, value: AgentValue, ) -> Result<(), AgentError>
pub fn try_send_agent_out( &self, agent_id: String, ctx: AgentContext, pin: String, value: AgentValue, ) -> Result<(), AgentError>
pub fn write_board_value( &self, name: String, value: AgentValue, ) -> Result<(), AgentError>
pub fn subscribe(&self, observer: Box<dyn ASKitObserver + Sync + Send>) -> usize
pub fn unsubscribe(&self, observer_id: usize)
Trait Implementations§
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<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S
Source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
Convert the source color to the destination color using the specified
method
Source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
Convert the source color to the destination color using the bradford
method by default
Source§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
Source§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Convert the given value into an approximately equivalent representation.
Source§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
Source§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
Source§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
Source§impl<T> ConvUtil for T
impl<T> ConvUtil for T
Source§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
Approximate the subject to a given type with the default scheme.
Source§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
Approximate the subject to a given type with a specific scheme.
Source§impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
Source§fn into_color(self) -> U
fn into_color(self) -> U
Convert into T with values clamped to the color defined bounds Read more
Source§impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
Source§fn into_color_unclamped(self) -> U
fn into_color_unclamped(self) -> U
Convert into T. The resulting color might be invalid in its color space Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.Source§impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
Source§fn try_into_color(self) -> Result<U, OutOfBounds<U>>
fn try_into_color(self) -> Result<U, OutOfBounds<U>>
Convert into T, returning ok if the color is inside of its defined
range, otherwise an
OutOfBounds error is returned which contains
the unclamped color. Read more