use crate::imports::*;
pub type ServiceResult = Result<()>;
#[async_trait]
pub trait Service: Sync + Send {
fn name(&self) -> &'static str;
async fn spawn(self: Arc<Self>, runtime: Runtime) -> ServiceResult;
fn terminate(self: Arc<Self>);
async fn join(self: Arc<Self>) -> ServiceResult;
}