use std::fmt::Debug;
use async_trait::async_trait;
use crate::Error;
#[async_trait]
pub trait GetsSystemInfo: Send + Sync + Clone + 'static {
async fn cpu_usage(&self) -> Result<f64, Error>;
fn memory_usage(&self) -> Result<f64, Error>;
fn load_avg(&self) -> Result<(f64, f64, f64), Error>;
}
pub trait TypeExtractor: Clone + Debug + Send + Sync + 'static {
type Type: Clone + Debug + Send + Sync + Ord + 'static;
type Request: Send;
fn extract(&self, req: &Self::Request) -> Option<Self::Type>;
}