sl4f_lib/diagnostics/
types.rsuse serde::{Deserialize, Serialize};
#[derive(Debug, PartialEq)]
pub enum DiagnosticsMethod {
SnapshotInspect,
}
#[derive(Serialize, Deserialize)]
pub struct SnapshotInspectArgs {
pub selectors: Vec<String>,
pub service_name: String,
}
impl std::str::FromStr for DiagnosticsMethod {
type Err = anyhow::Error;
fn from_str(method: &str) -> Result<Self, Self::Err> {
match method {
"SnapshotInspect" => Ok(DiagnosticsMethod::SnapshotInspect),
_ => return Err(format_err!("invalid Diagnostics Facade method: {}", method)),
}
}
}