Skip to main content

to_array_string

Function to_array_string 

Source
pub fn to_array_string<const CAP: usize, T>(t: T) -> ArrayString<CAP>
where T: Display,
Expand description

Displays a value into an array string with constant byte capacity.

Output is confined to the stack, so CAP must bound the formatted length. Panics when the output exceeds it, or when the value’s Display implementation returns a formatting error.