pub fn apply_query_ops(uri: &Uri, ops: &QueryOps) -> Option<Uri>Expand description
Apply query manipulation ops to a request URI (DW-028). Returns the
rebuilt URI, or None when nothing changed (the caller keeps the
original — its bytes are already correct). Original pairs are
carried VERBATIM (no decode/re-encode round trip: a client’s exact
percent-encoding spelling survives); only pairs a named op touches
are encoded, by the shared percent-encoder below.
Per-pair application order (deterministic, documented): a key named
by remove or owned by set is dropped from its original position
(set re-emits its pair at the end; remove just drops), then
rename re-labels surviving pairs in place (value bytes verbatim),
and add pairs append at the end (after set, both in sorted key
order). Key matching is on RAW bytes — neither the config key nor
the request key is percent-decoded first, so set: {a: "1"}
matches the literal a=1, never %61=1.