#[derive(Debug, Clone, PartialEq, Eq)]
pub enum Exit<E> {
Fail(E),
Die(String),
Interrupt,
}
impl<E> Exit<E> {
pub fn is_interrupt(&self) -> bool {
matches!(self, Self::Interrupt)
}
}
impl From<crate::error::ActorError> for Exit<crate::error::ActorError> {
fn from(error: crate::error::ActorError) -> Self {
Self::Fail(error)
}
}