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
//! Route DSL macros for Kegani
//!
//! Provides `#[route]`, `#[get]`, `#[post]`, `#[put]`, `#[delete]` procedural macros
//! and route grouping helpers.
/// General route macro - registers a route with the given path and HTTP method
///
/// # Example
///
/// ```rust,ignore
/// #[route("/users/{id}", method = "GET")]
/// async fn get_user(...) { ... }
/// ```
pub use route;
/// GET route macro
///
/// # Example
///
/// ```rust,ignore
/// #[get("/api/users")]
/// async fn list_users(...) { ... }
/// ```
pub use get;
/// POST route macro
///
/// # Example
///
/// ```rust,ignore
/// #[post("/api/users")]
/// async fn create_user(...) { ... }
/// ```
pub use post;
/// PUT route macro
///
/// # Example
///
/// ```rust,ignore
/// #[put("/api/users/{id}")]
/// async fn update_user(...) { ... }
/// ```
pub use put;
/// DELETE route macro
///
/// # Example
///
/// ```rust,ignore
/// #[delete("/api/users/{id}")]
/// async fn delete_user(...) { ... }
/// ```
pub use delete;
/// PATCH route macro
///
/// # Example
///
/// ```rust,ignore
/// #[patch("/api/users/{id}")]
/// async fn patch_user(...) { ... }
/// ```
pub use patch;