1 2 3 4 5 6 7 8 9 10 11 12 13
use anthill_di::types::TypeInfo;
use async_trait::async_trait;
#[async_trait]
pub trait IBaseService where Self: Sync + Send + 'static {
async fn on_start(&mut self);
async fn on_stop(&mut self);
fn get_type_info(&self) -> TypeInfo {
TypeInfo::from_type::<Self>()
}
}