use std::fmt::{Debug, Display};
pub type AppResult<E> = Result<Option<u8>, E>;
#[async_trait::async_trait]
pub trait AppSession: Clone + Send + Sync {
type Error: Debug + Display + Send + 'static;
async fn startup(&mut self) -> AppResult<Self::Error> {
Ok(None)
}
async fn analyze(&mut self) -> AppResult<Self::Error> {
Ok(None)
}
async fn execute(&mut self) -> AppResult<Self::Error> {
Ok(None)
}
async fn shutdown(&mut self) -> AppResult<Self::Error> {
Ok(None)
}
}