pub trait MonitoringAgent: Debug {
// Required methods
fn collect_resource_metrics<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ResourceMetrics>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn predict_resource_usage<'life0, 'async_trait>(
&'life0 self,
horizon: Duration,
) -> Pin<Box<dyn Future<Output = Result<ResourceUsagePrediction>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_agent_health(&self) -> AgentHealth;
}Expand description
Trait for monitoring agents
Required Methods§
fn collect_resource_metrics<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ResourceMetrics>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn predict_resource_usage<'life0, 'async_trait>(
&'life0 self,
horizon: Duration,
) -> Pin<Box<dyn Future<Output = Result<ResourceUsagePrediction>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_agent_health(&self) -> AgentHealth
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".