truncate_reason

Function truncate_reason 

Source
pub fn truncate_reason(s: String) -> String
Expand description

Truncate to FAILURE_REASON_MAX_LEN chars; appends "...[truncated]" when truncation fires. UTF-8 safe: bumps end back to the prior char boundary if a multibyte sequence would be split.