Skip to main content

json_response

Function json_response 

Source
pub fn json_response<T: Serialize + Send + Sync>(
    result: ServiceResult<T>,
    ctx: Arc<CorrelationContext>,
) -> Response<String>
Expand description

Builds a complete HTTP response from a ServiceResult<T>, setting correlation headers and the content type from the result’s response type.