use serde::{Deserialize, Serialize};
#[derive(
Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Default, Debug, Serialize, Deserialize,
)]
#[non_exhaustive]
pub enum MassMode {
#[default]
Monoisotopic,
Average,
#[cfg(feature = "isotopes")]
MostAbundant,
}
impl std::fmt::Display for MassMode {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
Self::Average => write!(f, "average weight"),
Self::Monoisotopic => write!(f, "monoisotopic mass"),
#[cfg(feature = "isotopes")]
Self::MostAbundant => write!(f, "most abundant mass"),
}
}
}