Format slices / arrays
The
{=[?]}
parameter can be used to log a slice of values that implement theFormat
trait.
The expected argument is a slice.
[T] where T: Format
also implements the Format
trait so it's possible to format [T]
with {=?}
but {=[?]}
uses slightly less bandwidth.
💡 Note that for slices of bytes,
{=[u8]}
should be preferred as it's better compressed.
Arrays
If you have an array of types that implement the Format
trait, you should use
the {=[?; N]}
parameter (where N
is the number of elements); this saves bandwidth compared to {=[?]}
.