[−][src]Crate actori_web_codegen
Actori-web codegen module
Generators for routes and scopes
Route
Macros:
Attributes:
"path"
- Raw literal string with path for which to register handle. Mandatory.guard="function_name"
- Registers function as guard usingactori_web::guard::fn_guard
Notes
Function name can be specified as any expression that is going to be accessible to the generate
code (e.g my_guard
or my_module::my_guard
)
Example:
use actori_web::HttpResponse; use actori_web_codegen::get; use futures::{future, Future}; #[get("/test")] async fn async_test() -> Result<HttpResponse, actori_web::Error> { Ok(HttpResponse::Ok().finish()) }
Attribute Macros
connect | Creates route handler with |
delete | Creates route handler with |
get | Creates route handler with |
head | Creates route handler with |
options | Creates route handler with |
patch | Creates route handler with |
post | Creates route handler with |
put | Creates route handler with |
trace | Creates route handler with |