pub struct AgentRegistry { /* private fields */ }Expand description
A cheap-to-clone registry of resolved agent specifications.
Implementations§
Source§impl AgentRegistry
impl AgentRegistry
pub fn new(specs: Vec<AgentSpec>) -> Self
pub fn all(&self) -> &[AgentSpec]
pub fn get(&self, name: &str) -> Option<&AgentSpec>
pub fn agent_invocable(&self) -> impl Iterator<Item = &AgentSpec>
Sourcepub fn resolve_agent_invocable(
&self,
name: &str,
) -> Result<AgentSpec, AgentRegistryError>
pub fn resolve_agent_invocable( &self, name: &str, ) -> Result<AgentSpec, AgentRegistryError>
Resolve an agent that is exposed for delegation.
Trait Implementations§
Source§impl Clone for AgentRegistry
impl Clone for AgentRegistry
Source§fn clone(&self) -> AgentRegistry
fn clone(&self) -> AgentRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 AgentRegistry
impl Debug for AgentRegistry
Source§impl Default for AgentRegistry
impl Default for AgentRegistry
Source§fn default() -> AgentRegistry
fn default() -> AgentRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for AgentRegistry
impl RefUnwindSafe for AgentRegistry
impl Send for AgentRegistry
impl Sync for AgentRegistry
impl Unpin for AgentRegistry
impl UnsafeUnpin for AgentRegistry
impl UnwindSafe for AgentRegistry
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