Get the language name for syntax highlighting
(&self)
| 54 | #[default] |
| 55 | Text, |
| 56 | Binary, |
| 57 | } |
| 58 | #[allow(dead_code)] |
| 59 | impl ContentCategory { |
| 60 | /// Get the language name for syntax highlighting |
| 61 | pub fn language(&self) -> &'static str { |
| 62 | match self { |
| 63 | ContentCategory::Json => "json", |
| 64 | ContentCategory::Html => "html", |
| 65 | ContentCategory::Xml => "xml", |
| 66 | ContentCategory::Image => "text", |
| 67 | ContentCategory::Audio => "text", |
| 68 | ContentCategory::Text => "text", |
| 69 | ContentCategory::Binary => "text", |