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
use Arc;
use Router;
use crateOxideRouter;
use crateAppState;
/// Trait implemented by `#[controller]`-annotated types.
///
/// You don't implement this manually — the `#[controller("/prefix")]` macro
/// generates the implementation for you.
///
/// # Generated methods
///
/// - `from_state` — constructs the controller, extracting dependencies from
/// [`AppState`]. Panics with a clear message at startup if a dependency is
/// missing.
/// - `register` — returns an [`OxideRouter`] with all route methods registered.
/// Methods that take `&self` are wrapped in closures that capture `Arc<Self>`.