Registering custom formatters should be done from other crates:
- A) Because
re_format cannot depend on other crates (cyclic deps)
- B) Because how to deserialize and inspect some type is a private implementation detail of that type,
re_format shouldn't know how to deserialize and format a TUID for example...
The problem is: when to register?
We need those custom formatters to be available at all time: examples, binaries, tests, benchmarks... we can't manually handle the registration for every permutation.
Ideally, we want to do the registration statically, which is tricky.
There are some options though, e.g.:
Registering custom formatters should be done from other crates:
re_formatcannot depend on other crates (cyclic deps)re_formatshouldn't know how to deserialize and format aTUIDfor example...The problem is: when to register?
We need those custom formatters to be available at all time: examples, binaries, tests, benchmarks... we can't manually handle the registration for every permutation.
Ideally, we want to do the registration statically, which is tricky.
There are some options though, e.g.: