1 2 3 4 5 6 7 8 9 10 11 12 13
use hosting::Service; #[derive(Service)] #[service(constructor = connect)] struct Database; impl Database { async fn connect() -> Self { Database } } fn main() {}