pub struct InMemoryAgentCatalog { /* private fields */ }Implementations§
Source§impl InMemoryAgentCatalog
impl InMemoryAgentCatalog
pub fn new() -> Self
pub fn register( &mut self, agent_id: impl Into<String>, agent: ResolvedAgent, ) -> Result<(), AgentCatalogError>
pub fn upsert(&mut self, agent_id: impl Into<String>, agent: ResolvedAgent)
pub fn extend_upsert(&mut self, agents: HashMap<String, ResolvedAgent>)
pub fn extend_catalog( &mut self, other: &dyn AgentCatalog, ) -> Result<(), AgentCatalogError>
Trait Implementations§
Source§impl AgentCatalog for InMemoryAgentCatalog
impl AgentCatalog for InMemoryAgentCatalog
fn len(&self) -> usize
fn get(&self, id: &str) -> Option<ResolvedAgent>
fn ids(&self) -> Vec<String>
fn snapshot(&self) -> HashMap<String, ResolvedAgent>
fn is_empty(&self) -> bool
fn descriptor(&self, id: &str) -> Option<AgentDescriptor>
fn descriptors(&self) -> HashMap<String, AgentDescriptor>
Source§impl Clone for InMemoryAgentCatalog
impl Clone for InMemoryAgentCatalog
Source§fn clone(&self) -> InMemoryAgentCatalog
fn clone(&self) -> InMemoryAgentCatalog
Returns a duplicate of the value. Read more
1.0.0 · 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 InMemoryAgentCatalog
impl Debug for InMemoryAgentCatalog
Source§impl Default for InMemoryAgentCatalog
impl Default for InMemoryAgentCatalog
Source§fn default() -> InMemoryAgentCatalog
fn default() -> InMemoryAgentCatalog
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for InMemoryAgentCatalog
impl RefUnwindSafe for InMemoryAgentCatalog
impl Send for InMemoryAgentCatalog
impl Sync for InMemoryAgentCatalog
impl Unpin for InMemoryAgentCatalog
impl UnwindSafe for InMemoryAgentCatalog
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