use crate::Transcript;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum OutputFormat {
Text,
Json,
}
impl OutputFormat {
pub fn render(self, t: &Transcript) -> String {
match self {
OutputFormat::Text => t.text.clone(),
OutputFormat::Json => {
serde_json::to_string_pretty(t).unwrap_or_else(|_| "{}".to_string())
}
}
}
}