pub struct AgentInfo {
pub id: AgentId,
pub name: String,
pub role: AgentRole,
pub capabilities: Vec<Capability>,
pub status: AgentDiscoveryStatus,
pub last_heartbeat: Instant,
pub metadata: HashMap<String, Value>,
pub endpoint: Option<String>,
}Expand description
Information about a discovered agent
Fields§
§id: AgentIdAgent identifier
name: StringAgent name
role: AgentRoleAgent role
capabilities: Vec<Capability>Agent capabilities
status: AgentDiscoveryStatusAgent status
last_heartbeat: InstantLast heartbeat time
metadata: HashMap<String, Value>Agent metadata
endpoint: Option<String>Agent endpoint (for remote agents)
Implementations§
Source§impl AgentInfo
impl AgentInfo
pub fn new(id: AgentId, name: impl Into<String>, role: AgentRole) -> Self
pub fn with_capabilities(self, capabilities: Vec<Capability>) -> Self
pub fn with_endpoint(self, endpoint: impl Into<String>) -> Self
pub fn add_metadata(self, key: impl Into<String>, value: Value) -> Self
Sourcepub fn has_capability(&self, capability: &Capability) -> bool
pub fn has_capability(&self, capability: &Capability) -> bool
Check if agent has a specific capability
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AgentInfo
impl RefUnwindSafe for AgentInfo
impl Send for AgentInfo
impl Sync for AgentInfo
impl Unpin for AgentInfo
impl UnsafeUnpin for AgentInfo
impl UnwindSafe for AgentInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more