pub struct AgentSet<C: AgentContext> {
pub set: BTreeMap<String, Arc<dyn DynAgent<C>>>,
}Expand description
Fields§
§set: BTreeMap<String, Arc<dyn DynAgent<C>>>Implementations§
Source§impl<C> AgentSet<C>
impl<C> AgentSet<C>
Sourcepub fn contains(&self, name: &str) -> bool
pub fn contains(&self, name: &str) -> bool
Returns whether an agent with the given name exists.
Sourcepub fn contains_lowercase(&self, lowercase_name: &str) -> bool
pub fn contains_lowercase(&self, lowercase_name: &str) -> bool
Returns whether an agent with the given lowercase name exists.
Sourcepub fn definition(&self, name: &str) -> Option<FunctionDefinition>
pub fn definition(&self, name: &str) -> Option<FunctionDefinition>
Returns the function definition for a specific agent.
Sourcepub fn definitions(&self, names: Option<&[String]>) -> Vec<FunctionDefinition>
pub fn definitions(&self, names: Option<&[String]>) -> Vec<FunctionDefinition>
Sourcepub fn select_resources(
&self,
name: &str,
resources: &mut Vec<Resource>,
) -> Vec<Resource>
pub fn select_resources( &self, name: &str, resources: &mut Vec<Resource>, ) -> Vec<Resource>
Removes and returns resources supported by the named agent.
Trait Implementations§
Auto Trait Implementations§
impl<C> !RefUnwindSafe for AgentSet<C>
impl<C> !UnwindSafe for AgentSet<C>
impl<C> Freeze for AgentSet<C>
impl<C> Send for AgentSet<C>
impl<C> Sync for AgentSet<C>
impl<C> Unpin for AgentSet<C>
impl<C> UnsafeUnpin for AgentSet<C>
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