pub struct AgentDefinition {
pub kind: String,
pub name: String,
pub title: Option<String>,
pub description: Option<String>,
pub category: Option<String>,
pub inputs: Option<Vec<String>>,
pub outputs: Option<Vec<String>>,
pub default_config: Option<AgentDefaultConfig>,
pub global_config: Option<Vec<(String, AgentConfigEntry)>>,
pub display_config: Option<Vec<(String, AgentDisplayConfigEntry)>>,
pub native_thread: bool,
pub new_boxed: Option<fn(askit: ASKit, id: String, def_name: String, config: Option<AgentConfig>) -> Result<Box<dyn Agent + Send + Sync>, AgentError>>,
}Fields§
§kind: String§name: String§title: Option<String>§description: Option<String>§category: Option<String>§inputs: Option<Vec<String>>§outputs: Option<Vec<String>>§default_config: Option<AgentDefaultConfig>§global_config: Option<Vec<(String, AgentConfigEntry)>>§display_config: Option<Vec<(String, AgentDisplayConfigEntry)>>§native_thread: bool§new_boxed: Option<fn(askit: ASKit, id: String, def_name: String, config: Option<AgentConfig>) -> Result<Box<dyn Agent + Send + Sync>, AgentError>>Implementations§
Source§impl AgentDefinition
impl AgentDefinition
pub fn new( kind: impl Into<String>, name: impl Into<String>, new_boxed: Option<fn(askit: ASKit, id: String, def_name: String, config: Option<AgentConfig>) -> Result<Box<dyn Agent + Send + Sync>, AgentError>>, ) -> Self
pub fn with_title(self, title: &str) -> Self
pub fn with_description(self, description: &str) -> Self
pub fn with_category(self, category: &str) -> Self
pub fn with_inputs(self, inputs: Vec<&str>) -> Self
pub fn with_outputs(self, outputs: Vec<&str>) -> Self
pub fn with_default_config(self, config: Vec<(&str, AgentConfigEntry)>) -> Self
pub fn with_global_config(self, config: Vec<(&str, AgentConfigEntry)>) -> Self
pub fn with_display_config( self, config: Vec<(&str, AgentDisplayConfigEntry)>, ) -> Self
pub fn use_native_thread(self) -> Self
Trait Implementations§
Source§impl Clone for AgentDefinition
impl Clone for AgentDefinition
Source§fn clone(&self) -> AgentDefinition
fn clone(&self) -> AgentDefinition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for AgentDefinition
impl Debug for AgentDefinition
Source§impl Default for AgentDefinition
impl Default for AgentDefinition
Source§fn default() -> AgentDefinition
fn default() -> AgentDefinition
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AgentDefinition
impl<'de> Deserialize<'de> for AgentDefinition
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for AgentDefinition
impl RefUnwindSafe for AgentDefinition
impl Send for AgentDefinition
impl Sync for AgentDefinition
impl Unpin for AgentDefinition
impl UnwindSafe for AgentDefinition
Blanket Implementations§
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