use crate::types::Error;
use diagnostics_data::{Data, DiagnosticsData};
use fidl_fuchsia_diagnostics::Selector;
use fidl_fuchsia_sys2 as fsys2;
use serde::Serialize;
use std::fmt::Display;
use std::future::Future;
pub trait Command {
type Result: Serialize + Display;
fn execute<P: DiagnosticsProvider>(
self,
provider: &P,
) -> impl Future<Output = Result<Self::Result, Error>>;
}
pub trait DiagnosticsProvider: Send + Sync {
fn snapshot<D: DiagnosticsData>(
&self,
accessor: Option<&str>,
selectors: impl IntoIterator<Item = Selector>,
) -> impl Future<Output = Result<Vec<Data<D>>, Error>>;
fn get_accessor_paths(&self) -> impl Future<Output = Result<Vec<String>, Error>>;
fn realm_query(&self) -> &fsys2::RealmQueryProxy;
}