Skip to main content

Module fmt

Module fmt 

Expand description

Allocation-aware formatting helpers.

Structs§

DisplayFn
Deferred formatting value created by display_fn.

Functions§

display_fn
Build a deferred Display value from a formatting closure.
format_with_capacity
Format args into a new string with the requested initial capacity.
hex
Borrow bytes as contiguous lowercase hexadecimal without a prefix.
try_format_into
Clear output, try to format args into it, and return the resulting string.
utf8_or_hex
Display valid UTF-8 as a quoted debug string, or other bytes as uppercase hexadecimal prefixed with 0x.
write_joined
Write fmt::Display values separated by separator without allocating.
write_joined_with
Write values separated by separator, using write_value for each value.