gearbox-rs-core 0.2.0

Core framework for Gearbox - dependency injection and HTTP routing
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use axum::routing::MethodRouter;
use std::sync::Arc;

use crate::hub::Hub;

/// Registration for a route handler collected via inventory.
pub struct RouteRegistration {
    pub path: &'static str,
    pub method: &'static str,
    pub handler: fn() -> MethodRouter<Arc<Hub>>,
}

inventory::collect!(RouteRegistration);