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
//! Zero-axum public HTTP types.
//!
//! User code says `arcly_http::Response`, `arcly_http::Json`, etc. — no
//! `axum::…` paths in the public surface. Internally these are thin
//! delegations to axum, so we keep its battle-tested implementation without
//! welding it into the public API.
//!
//! Why a private `axum::response::Response` re-export rather than a full
//! newtype: pinning `axum::response::Response` is the *one* type the
//! framework's boundary code constructs; making it a newtype would force
//! every adapter / interceptor to unwrap repeatedly with zero behavioural
//! benefit. A `pub use` rename achieves the same "no axum in user paths"
//! outcome at zero runtime cost.
use Serialize;
/// The framework's response type. Same memory shape as axum's; the alias
/// keeps the user-visible path `arcly_http::Response`.
pub use Response;
/// Convert a value into a `Response`.
///
/// `arcly_http::IntoResponse` is a thin re-trait over axum's so user code
/// never types `axum`. A blanket impl makes every axum-compatible type
/// automatically satisfy ours.
/// JSON response wrapper. `Json(body)` writes `Content-Type: application/json`
/// and serialises `body` with `serde_json`. Same surface as axum's `Json` so
/// the route macro's return-type walker (`Json<T> | Result<Json<T>, _>`)
/// keeps working without changes.
;