Format
⚠️ The design and implementation chapter is outdated ⚠️
The untyped argument (=?
) requires one level of indirection during serialization.
First let's see how a primitive implements the Format
trait:
Format
will use the write!
macro.
This will send the string index of {=u8}
followed by the one-byte data.
In general, write!
can use {=?}
so Format
nesting is possible.
Now let's look into a log invocation:
This will send the string index of "The answer is {:?}!" and invoke the argument's Format::format
method.