Skip to main content

redact

Function redact 

Source
pub fn redact(text: &str) -> Cow<'_, str>
Expand description

Scrub credential patterns from text. Returns Cow::Borrowed (no allocation) when nothing matched, so the common case is cheap. The regex crate is linear-time, so this is safe on adversarial/large input.