mod scg;
pub use scg::{natural_sort_ids, parse_scg, serialize_scg};
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum Format {
Json,
Scg,
}
impl Format {
pub fn from_extension(ext: &str) -> Option<Self> {
match ext.to_lowercase().as_str() {
"json" => Some(Format::Json),
"scg" => Some(Format::Scg),
_ => None,
}
}
pub fn extension(&self) -> &'static str {
match self {
Format::Json => "json",
Format::Scg => "scg",
}
}
}