pub fn encode_path_segment(input: &str) -> StringExpand description
Percent-encodes a single URL path segment, so that values interpolated into the path (such as key-value-store record keys or request IDs) cannot break out of the segment or inject a query string.
Encodes everything except the RFC 3986 “unreserved” characters. Notably /, ?, #,
space and any non-ASCII bytes are escaped — unlike a raw format!(".../{key}"), which
would leave them intact and produce a malformed or wrong-endpoint URL.