use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, Default)]
pub enum ModuleFormat {
#[default]
Unknown,
Mod,
S3m,
Xm,
It,
Sid,
Dw,
}
impl ModuleFormat {
#[inline]
pub fn is_xm(&self) -> bool {
matches!(self, ModuleFormat::Xm)
}
#[inline]
pub fn is_s3m(&self) -> bool {
matches!(self, ModuleFormat::S3m)
}
#[inline]
pub fn is_it(&self) -> bool {
matches!(self, ModuleFormat::It)
}
#[inline]
pub fn is_mod(&self) -> bool {
matches!(self, ModuleFormat::Mod)
}
#[inline]
pub fn is_dw(&self) -> bool {
matches!(self, ModuleFormat::Dw)
}
}