Skip to main content

encode_response

Function encode_response 

Source
pub fn encode_response(
    status: StatusCode,
    content_type: &str,
    identity: Bytes,
    identity_etag: Option<&str>,
    accept_encoding: Option<&str>,
    if_none_match: Option<&str>,
    extra: &[(&str, &str)],
) -> Response
Expand description

Apply negotiation + validators to an identity body, returning a full response. identity_etag is the caller-computed ETag (over identity bytes) or None to skip validator handling.