1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum OutputMode { Human, Json, Jsonl, } impl OutputMode { pub const fn from_json_flags(json: bool, jsonl: bool) -> Self { if jsonl { Self::Jsonl } else if json { Self::Json } else { Self::Human } } }