pub struct DynamicAgent { /* private fields */ }Expand description
Agent wrapper for type erasure
Implementations§
Source§impl DynamicAgent
impl DynamicAgent
Sourcepub fn new(id: impl Into<String>, capabilities: Vec<String>) -> Self
pub fn new(id: impl Into<String>, capabilities: Vec<String>) -> Self
Create a new dynamic agent
Sourcepub fn capabilities(&self) -> &[String]
pub fn capabilities(&self) -> &[String]
Get agent capabilities
Sourcepub fn status(&self) -> AgentStatus
pub fn status(&self) -> AgentStatus
Get agent status
Sourcepub fn set_status(&mut self, status: AgentStatus)
pub fn set_status(&mut self, status: AgentStatus)
Set agent status
Sourcepub fn can_handle(&self, task: &Task) -> bool
pub fn can_handle(&self, task: &Task) -> bool
Check if agent can handle a task
Sourcepub fn has_capability(&self, capability: &str) -> bool
pub fn has_capability(&self, capability: &str) -> bool
Check if agent has capability
Auto Trait Implementations§
impl Freeze for DynamicAgent
impl !RefUnwindSafe for DynamicAgent
impl Send for DynamicAgent
impl Sync for DynamicAgent
impl Unpin for DynamicAgent
impl !UnwindSafe for DynamicAgent
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