pub struct Registry {
pub version: String,
pub agents: Vec<RegistryAgent>,
pub extensions: Option<Vec<Value>>,
}Expand description
Top-level registry payload fetched from REGISTRY_URL.
Fields§
§version: StringVersion label published alongside the registry payload.
agents: Vec<RegistryAgent>List of every registered agent exposed by the catalog.
extensions: Option<Vec<Value>>Optional extension data the catalog producer may append.
Implementations§
Source§impl Registry
impl Registry
Sourcepub fn from_slice(input: &[u8]) -> Result<Self>
pub fn from_slice(input: &[u8]) -> Result<Self>
Decodes the registry payload from a byte slice and validates it.
Sourcepub fn from_value(input: Value) -> Result<Self>
pub fn from_value(input: Value) -> Result<Self>
Decodes the registry from a serde_json::Value and validates it.
Sourcepub fn list_agents(&self) -> &[RegistryAgent]
pub fn list_agents(&self) -> &[RegistryAgent]
Returns the raw RegistryAgent list that backs CLI commands/queries.
Sourcepub fn find_agent(&self, agent_id: &str) -> Option<&RegistryAgent>
pub fn find_agent(&self, agent_id: &str) -> Option<&RegistryAgent>
Finds an agent by id, returning None if no match exists.
Sourcepub fn get_agent(&self, agent_id: &str) -> Result<&RegistryAgent>
pub fn get_agent(&self, agent_id: &str) -> Result<&RegistryAgent>
Retrieves an agent, failing if the agent_id is unknown.
Sourcepub fn search_agents(&self, query: &str) -> Vec<&RegistryAgent>
pub fn search_agents(&self, query: &str) -> Vec<&RegistryAgent>
Case-insensitive search across id, name, and description.
An empty query returns all agents, just like the list command.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Registry
impl<'de> Deserialize<'de> for Registry
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
impl StructuralPartialEq for Registry
Auto Trait Implementations§
impl Freeze for Registry
impl RefUnwindSafe for Registry
impl Send for Registry
impl Sync for Registry
impl Unpin for Registry
impl UnsafeUnpin for Registry
impl UnwindSafe for Registry
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