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
//! `handler!` macro for simplified handler definitions.
/// Define a handler with automatic extractor wrapping.
///
/// This macro creates an async function that accepts `AutoJson<T>` and
/// extracts the inner value automatically.
///
/// # Example
///
/// ```no_run
/// use actix_tower::prelude::*;
/// use serde::{Deserialize, Serialize};
///
/// #[derive(Deserialize, Serialize)]
/// struct CreateUser { name: String }
///
/// handler!(create_user, json: CreateUser => {
/// HttpResponse::Ok().json(json.into_inner())
/// });
/// ```
pub use handler;