Expand description
Method routers and per-operation metadata.
ⓘ
App::new().route(
"/users",
post(create_user).status(201).summary("Create a user").tag("users")
.get(list_users).tag("users"),
)Metadata methods (summary, tag, status, …) apply to the most
recently added method. Route macros (#[post(...)]) expand to exactly
these calls.
Structs§
- Method
Router - Maps HTTP methods to handlers for a single path.
- Operation
Meta - Static metadata attached to one operation.
- Route
- A path plus its method router; produced by route macros and
routes![].