pub struct HttpUri { /* private fields */ }Expand description
An HTTP URI or relative location with a precomputed diagnostic representation.
Construction preserves the original spelling and masks user information and recognized credential query values in a separate representation. It does not validate, resolve, or normalize the URI. Ordinary query values remain intact. Clones share both representations; formatting does not repeat redaction.
Recognized query names are Signature, Policy, token, access_token,
X-Amz-Signature, and X-Amz-Security-Token, matched case-insensitively after
decoding the name. Arbitrary application parameters are not classified.
Implementations§
Source§impl HttpUri
impl HttpUri
Sourcepub fn new(uri: impl Into<Arc<str>>) -> Self
pub fn new(uri: impl Into<Arc<str>>) -> Self
Retain the original URI and compute its diagnostic representation once.
Sourcepub fn original_uri(&self) -> &str
pub fn original_uri(&self) -> &str
Return the original URI, including any credentials it contains.
Sourcepub fn redacted_uri(&self) -> &str
pub fn redacted_uri(&self) -> &str
Return the URI with recognized credentials masked for diagnostics.
Sourcepub fn from_response_location(parts: &mut Parts) -> Option<&Self>
pub fn from_response_location(parts: &mut Parts) -> Option<&Self>
Get or create the diagnostic value for a response’s Location header.
Store it in response extensions so service errors and shared response
diagnostics reuse the same value. If a wrapper changes the header,
replace the cached value. Return None for missing or non-text headers.
The original header is not changed.