1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
//! HTTP/ADR layer for the Aro web framework.
//!
//! This crate provides the web adapter built on Axum. Axum is re-exported at
//! the crate root as an intentional escape hatch: advanced features (auth,
//! `WebSockets`, `OpenAPI`, static files, etc.) are delegated to the Axum/tower
//! ecosystem rather than wrapped by Aro.
pub use App;
pub use axum;
pub use DefaultBodyLimit;
pub use pastey as __private_pastey;
// SSE support
pub use ;
/// Collect route handlers into an `axum::Router<AroState>`.
///
/// Takes a list of handler function names and chains their generated
/// `__aro_register_<fn>` functions into a single Router. Non-empty invocations
/// produce a `Router<AroState>`, making handlers compatible with both stateless
/// handlers and handlers using `Dep<T>` extractors.
///
/// # Examples
///
/// ```ignore
/// use aro_web::routes;
///
/// // Stateless handlers
/// let router = routes![hello, get_user, create_user];
/// App::new().routes_with_state(router).build();
///
/// // Stateful handlers using Dep<T>
/// let router = routes![handler_with_dep, stateless_handler];
/// App::new()
/// .register::<dyn MyService>(service)
/// .routes_with_state(router)
/// .build();
/// ```
///
/// Module-qualified paths are supported:
///
/// ```ignore
/// let router = routes![users::get_user, users::create_user];
/// ```
///
/// An empty invocation returns an empty `Router<()>` for composition with
/// stateless routes; use [`App::routes_with_state`](App::routes_with_state) only
/// when the router contains handlers:
///
/// ```ignore
/// let router = routes![];
/// ```
}
};
}
/// Internal helper: resolve a handler path to its registration function and call it.
///
/// Uses brackets `[prefix segments]` as an accumulator for the module path.