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
//! Route auto-discovery via `inventory`.
//!
//! When handlers are annotated with `#[get]`, `#[post]`, `#[put]`, or `#[delete]`,
//! the macro emits an `inventory::submit!` that registers a [`RouteDescriptor`]
//! at link time. Calling [`Rapina::discover()`](crate::app::Rapina::discover)
//! iterates these descriptors and wires them into the router automatically.
//!
//! The `#[public]` attribute emits a [`PublicMarker`] so the discovery loop
//! can mark routes as public without manual `.public_route()` calls.
use crateErrorVariant;
use crateRouter;
/// Metadata about a route handler, collected at link time via `inventory`.
///
/// Emitted by `#[get]`, `#[post]`, `#[put]`, `#[delete]` macros.
collect!;
/// Marker indicating a handler should be treated as public (no auth required).
///
/// Emitted by `#[public]` when placed above a route macro. When `#[public]`
/// is below the route macro, the route macro sets `is_public: true` on the
/// [`RouteDescriptor`] directly instead.
collect!;