pub struct AgentRegistry { /* private fields */ }Expand description
Thread-safe registry that maps string names to AgentRef handles.
Uses std::sync::RwLock (not tokio::sync) because all operations are
fast HashMap lookups — no .await is held across the lock.
Implementations§
Source§impl AgentRegistry
impl AgentRegistry
Sourcepub fn register(&self, name: impl Into<String>, agent: Agent) -> AgentRef
pub fn register(&self, name: impl Into<String>, agent: Agent) -> AgentRef
Register an agent under the given name, returning a shareable handle.
If an agent was already registered with this name it is replaced.
Trait Implementations§
Source§impl Clone for AgentRegistry
impl Clone for AgentRegistry
Source§fn clone(&self) -> AgentRegistry
fn clone(&self) -> AgentRegistry
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 moreAuto Trait Implementations§
impl Freeze for AgentRegistry
impl RefUnwindSafe for AgentRegistry
impl Send for AgentRegistry
impl Sync for AgentRegistry
impl Unpin for AgentRegistry
impl UnsafeUnpin 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