pub fn str_truncated(s: &str, max_len: usize) -> DebugValue<TruncatedStr<'_>>Expand description
Creates a tracing debug value that truncates a string.
The returned value can be recorded directly in a structured tracing field.
Strings exceeding the byte threshold end at the first UTF-8 boundary at or
after it, including the string’s end, with ... outside the closing quote.