pub struct RegistryClient { /* private fields */ }Expand description
Client that fetches an agent catalog from a remote HTTP registry (P2-8).
The registry is expected to serve a JSON array of AgentCards at
GET {base}/registry.json. Discovery helpers (search_skill) filter the
catalog locally so a remote directory needs zero extra endpoints.
Implementations§
Source§impl RegistryClient
impl RegistryClient
Sourcepub fn new(base_url: impl Into<String>) -> Result<Self, RegistryError>
pub fn new(base_url: impl Into<String>) -> Result<Self, RegistryError>
A client for a remote registry at base_url.
The client disables proxy usage: registries are typically on a private network, and an environment proxy must not intercept catalog fetches.
Sourcepub async fn fetch_catalog(&self) -> Result<Vec<AgentCard>, RegistryError>
pub async fn fetch_catalog(&self) -> Result<Vec<AgentCard>, RegistryError>
Fetch the full catalog from the remote registry.
Sourcepub async fn search_skill(
&self,
query: &str,
) -> Result<Vec<AgentCard>, RegistryError>
pub async fn search_skill( &self, query: &str, ) -> Result<Vec<AgentCard>, RegistryError>
Fetch the catalog and filter to agents advertising query as a skill.
Auto Trait Implementations§
impl !RefUnwindSafe for RegistryClient
impl !UnwindSafe for RegistryClient
impl Freeze for RegistryClient
impl Send for RegistryClient
impl Sync for RegistryClient
impl Unpin for RegistryClient
impl UnsafeUnpin for RegistryClient
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