currently, the message serialize an enum as a type field, then a data field containing the actul object. A lot of code was written to do that, and this code could be removed with serde 1.0's enum handling code: https://serde.rs/enum-representations.html