use std::any::{Any, type_name};
use crate::contracts::Application;
pub trait Service: Any + Send + Sync {
fn register<A: Application + ?Sized>() -> Self
where
Self: Sized;
fn boot<A: Application + ?Sized>() -> eyre::Result<()>
where
Self: Sized,
{
tracing::info!("[service] {} booted", type_name::<Self>());
Ok(())
}
}