As explained here:
You can add a format function to your type Foo or you could use the std.fmt.Formatter and use a freestanding function to explicitly format an argument to a printing function.
As explained here:
You can add a format function to your type Foo or you could use the std.fmt.Formatter and use a freestanding function to explicitly format an argument to a printing function.