Skip to main content

build_response

Function build_response 

Source
pub fn build_response(
    result: &dyn TypedServiceResult,
    ctx: Arc<CorrelationContext>,
) -> Response<String>
Expand description

Renders any TypedServiceResult as an http::Response<String> with correlation headers (X-Request-ID, X-Correlation-ID, X-Correlation-Flow) and a content type derived from the result. Serialization failures fall back to the result message as body.