use core::fmt;
#[derive(Clone, Debug, PartialEq, Eq)]
pub enum HostError {
Config(String),
ModelNotFound(String),
Preprocess(String),
Runtime(String),
Download(String),
Integrity(String),
Io(String),
}
impl fmt::Display for HostError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Self::Config(m) => write!(f, "host config: {m}"),
Self::ModelNotFound(m) => write!(f, "model not found: {m}"),
Self::Preprocess(m) => write!(f, "preprocess: {m}"),
Self::Runtime(m) => write!(f, "runtime: {m}"),
Self::Download(m) => write!(f, "download: {m}"),
Self::Integrity(m) => write!(f, "integrity: {m}"),
Self::Io(m) => write!(f, "io: {m}"),
}
}
}
impl std::error::Error for HostError {}