Skip to main content

Module request_id

Module request_id 

Source
Expand description

Standalone RequestId newtype for tracing HTTP requests end-to-end.

RequestId is a UUID v4 wrapper that surfaces the X-Request-Id header convention used across many API frameworks and proxies. It is reusable in both crate::error::ApiError and crate::response::ResponseMeta.

§Example

use api_bones::request_id::RequestId;

let id = RequestId::new();
assert_eq!(id.header_name(), "X-Request-Id");
assert!(!id.to_string().is_empty());

Structs§

RequestId
A UUID v4 request identifier, typically propagated via the X-Request-Id HTTP header.

Enums§

RequestIdError
Error returned when parsing a RequestId from a string fails.

Type Aliases§

RequestIdParseError
Backwards-compatible alias — prefer RequestIdError.