Skip to main content

to_small_string

Function to_small_string 

Source
pub fn to_small_string<const CAP: usize, T>(t: T) -> SmallString<[u8; CAP]>
where T: Display,
Expand description

Displays a value into a small string with an inline byte capacity.

Output beyond CAP bytes spills to the heap. Panics if the value’s Display implementation returns a formatting error.