Skip to main content

SharedAgent

Type Alias SharedAgent 

Source
pub type SharedAgent = Arc<dyn Agent>;
Expand description

Shareable agent handle for safe access across async tasks.

Because the Agent trait takes &self for all methods and concrete implementations (e.g. ReactAgent) use interior mutability for shared state, the outer lock is unnecessary — Arc<dyn Agent> is sufficient.

Aliased Type§

pub struct SharedAgent { /* private fields */ }