Function safe_format

Source
pub fn safe_format(args: Arguments<'_>) -> SmartString
Expand description

Safe formatting into SmartString for HFT systems

This function formats arguments into a SmartString, returning a static error message on formatting failure instead of panicking. This is critical for HFT systems where panics are unacceptable.

ยงExamples

let msg = safe_format(format_args!("Error: {}", "connection failed"));