pub enum Response {
McpBuffered {
envelope: Envelope,
message: McpMessage,
status: StatusCode,
headers: HeaderMap,
},
McpStreamed {
envelope: Envelope,
body: Body,
status: StatusCode,
headers: HeaderMap,
},
OauthJson {
doc: Value,
status: StatusCode,
headers: HeaderMap,
},
Raw {
body: Body,
status: StatusCode,
headers: HeaderMap,
},
Upstream502 {
reason: String,
},
}Expand description
Sum type produced by the transport, or by a short-circuiting
middleware. impl IntoResponse for Response (below) converts this
into an axum response at the edge.
Variants§
McpBuffered
Buffered MCP response: one parsed McpMessage, mutated in place
by response middlewares, serialized once by EnvelopeSeal.
McpStreamed
Streamed MCP response: bytes forwarded as-is. Content-touching middlewares do not fire on this variant.
OauthJson
OAuth discovery / token JSON — a parsed document that
UrlMapMiddleware rewrites before IntoResponse.
Raw
Forwarded raw body — no inspection.
Upstream502
Upstream failure. Travels through the response chain like any
other response — HealthTrack records it, emit tags the event
as upstream error, and IntoResponse renders a 502.
Trait Implementations§
Source§impl IntoResponse for Response
impl IntoResponse for Response
Source§fn into_response(self) -> Response
fn into_response(self) -> Response
Create a response.
Auto Trait Implementations§
impl Freeze for Response
impl !RefUnwindSafe for Response
impl Send for Response
impl !Sync for Response
impl Unpin for Response
impl UnsafeUnpin for Response
impl !UnwindSafe for Response
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more