pub mod dashboard;
pub mod emitter;
pub mod graph;
pub mod inspect;
pub mod shard;
use serde::Serialize;
#[derive(Debug, Clone, Copy, PartialEq)]
#[non_exhaustive]
pub enum OutputFormat {
Json,
Yaml,
}
impl OutputFormat {
pub fn serialize<T: Serialize>(&self, value: &T) -> anyhow::Result<String> {
match self {
Self::Json => Ok(serde_json::to_string_pretty(value)?),
Self::Yaml => Ok(yaml_serde::to_string(value)?),
}
}
}