pub fn redact(payload: Map<String, Value>) -> (Map<String, Value>, u32)Expand description
Replaces every secret-shaped span in every string of payload.
Returns the payload and how many spans were replaced, because a count is what a diagnostic line can say without saying what it found.
The payload is rewritten where it lies (runtime D37): a payload with no hit comes back as the same allocation, byte for byte, and a hit replaces the string it hit and moves nothing else.