pub struct Registry {
pub agents: HashMap<String, RegisteredAgent>,
}Expand description
Agent registry types used by CLI commands.
Fields§
§agents: HashMap<String, RegisteredAgent>Implementations§
Source§impl Registry
impl Registry
pub fn new() -> Self
Sourcepub fn load_from(artifact_root: &Path) -> Result<Self>
pub fn load_from(artifact_root: &Path) -> Result<Self>
Load registry from the .mdx-rust directory
Sourcepub fn save_to(&self, artifact_root: &Path) -> Result<()>
pub fn save_to(&self, artifact_root: &Path) -> Result<()>
Save registry to the .mdx-rust directory
pub fn register(&mut self, agent: RegisteredAgent)
pub fn get(&self, name: &str) -> Option<&RegisteredAgent>
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
Source§impl JsonSchema for Registry
impl JsonSchema for Registry
Source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref keyword. Read moreAuto 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