mirror of
https://github.com/fafhrd91/actix-web
synced 2025-09-01 01:16:59 +02:00
Add "name" attribute to route macro (#1934)
This commit is contained in:
@@ -71,6 +71,7 @@ mod route;
|
||||
///
|
||||
/// # Attributes
|
||||
/// - `"path"` - Raw literal string with path for which to register handler.
|
||||
/// - `name="resource_name"` - Specifies resource name for the handler. If not set, the function name of handler is used.
|
||||
/// - `method="HTTP_METHOD"` - Registers HTTP method to provide guard for. Upper-case string, "GET", "POST" for example.
|
||||
/// - `guard="function_name"` - Registers function as guard using `actix_web::guard::fn_guard`
|
||||
/// - `wrap="Middleware"` - Registers a resource middleware.
|
||||
@@ -116,6 +117,7 @@ Creates route handler with `actix_web::guard::", stringify!($variant), "`.
|
||||
|
||||
# Attributes
|
||||
- `"path"` - Raw literal string with path for which to register handler.
|
||||
- `name="resource_name"` - Specifies resource name for the handler. If not set, the function name of handler is used.
|
||||
- `guard="function_name"` - Registers function as guard using `actix_web::guard::fn_guard`.
|
||||
- `wrap="Middleware"` - Registers a resource middleware.
|
||||
|
||||
|
Reference in New Issue
Block a user