use std::fmt;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum ControlError {
NotPausable,
NotCancelable,
}
impl fmt::Display for ControlError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Self::NotPausable => write!(f, "progress task is not pausable"),
Self::NotCancelable => write!(f, "progress task is not cancelable"),
}
}
}
impl std::error::Error for ControlError {}