pub fn str_truncated(s: &str, max_len: usize) -> DebugValue<TruncatedStr<'_>>Expand description
See TruncatedStr. Useful for #[instrument]:
use tuwunel_core::utils::debug::str_truncated;
#[tracing::instrument(fields(foos = str_truncated(foos, 42)))]
fn bar(foos: &str) {}