1#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
4pub enum Format {
5 OpenAI,
7 OpenAIResponse,
9 Claude,
11 Gemini,
13 Codex,
15 Antigravity,
17 Interactions,
19}
20
21impl Format {
22 pub const ALL: [Format; 7] = [
23 Format::OpenAI,
24 Format::OpenAIResponse,
25 Format::Claude,
26 Format::Gemini,
27 Format::Codex,
28 Format::Antigravity,
29 Format::Interactions,
30 ];
31
32 pub fn as_str(self) -> &'static str {
34 match self {
35 Format::OpenAI => "openai",
36 Format::OpenAIResponse => "openai-response",
37 Format::Claude => "claude",
38 Format::Gemini => "gemini",
39 Format::Codex => "codex",
40 Format::Antigravity => "antigravity",
41 Format::Interactions => "interactions",
42 }
43 }
44
45 pub fn parse(s: &str) -> Option<Self> {
46 Self::ALL.into_iter().find(|f| f.as_str() == s)
47 }
48}