Skip to main content

request_id

Function request_id 

Source
pub fn request_id() -> (SetRequestIdLayer<UuidRequestId>, PropagateRequestIdLayer)
Expand description

Returns a tuple of layers that set and propagate an x-request-id header.

  • SetRequestIdLayer assigns a UUID v4 request ID on incoming requests that do not already carry one.
  • PropagateRequestIdLayer copies the request ID to the response.