In the future we should migrate this work to std.traits so other code (serialization etc) can profit from it.