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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
//! The proxy action contract — what an application's proxy function returns.
//!
//! The proxy is the smallest useful *global* request boundary (engine spec
//! §4): it runs before route selection and can continue, redirect, rewrite,
//! mutate request headers, or short-circuit with an early response. It is not
//! a second middleware ecosystem — Tower remains the real one; this is
//! application-owned global policy expressed as a pure decision.
//!
//! The engine interprets each variant and performs the actual HTTP work
//! (setting status/headers, rewriting the URI, delegating to the router), so
//! the application never touches Axum middleware machinery (engine spec §5).
use crate;
use crateResponse;
/// A decision made by the application's proxy function.
///
/// Constructed by application code and consumed by the engine's proxy
/// service. All HTTP mutation is performed by the engine — the application
/// only declares intent.