1 2 3 4 5 6 7 8 9 10 11
use anthill_di::types::TypeInfo;
#[async_trait_with_sync::async_trait(Sync)]
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>()
}
}