use std::path::PathBuf;
#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("unsupported vendor format at {0}")]
UnsupportedFormat(PathBuf),
#[error("openproteo-io was built without the '{vendor}' feature")]
FeatureDisabled { vendor: &'static str },
#[error(transparent)]
Io(#[from] std::io::Error),
#[error(transparent)]
Core(#[from] openproteo_core::Error),
#[cfg(feature = "thermo")]
#[error(transparent)]
Thermo(#[from] opentfraw::Error),
#[cfg(feature = "bruker")]
#[error(transparent)]
Bruker(#[from] opentimstdf::Error),
#[cfg(feature = "waters")]
#[error(transparent)]
Waters(#[from] openwraw::Error),
#[error("mzML error: {0}")]
Mzml(String),
}
pub type Result<T> = std::result::Result<T, Error>;