pub struct AgentRegistry { /* private fields */ }Expand description
Registry of TAP agents
Implementations§
Source§impl AgentRegistry
impl AgentRegistry
Sourcepub fn new(max_agents: Option<usize>) -> Self
pub fn new(max_agents: Option<usize>) -> Self
Create a new agent registry with the specified maximum number of agents
Sourcepub fn agent_count(&self) -> usize
pub fn agent_count(&self) -> usize
Get the current number of registered agents
Sourcepub fn has_agent(&self, did: &str) -> bool
pub fn has_agent(&self, did: &str) -> bool
Check if the registry has an agent with the given DID
Sourcepub async fn register_agent(
&self,
did: String,
agent: Arc<DefaultAgent>,
) -> Result<()>
pub async fn register_agent( &self, did: String, agent: Arc<DefaultAgent>, ) -> Result<()>
Register a new agent
Sourcepub async fn unregister_agent(&self, did: &str) -> Result<()>
pub async fn unregister_agent(&self, did: &str) -> Result<()>
Unregister an agent
Sourcepub fn get_all_dids(&self) -> Vec<String>
pub fn get_all_dids(&self) -> Vec<String>
Get all registered agent DIDs
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AgentRegistry
impl !RefUnwindSafe for AgentRegistry
impl Send for AgentRegistry
impl Sync for AgentRegistry
impl Unpin 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