msgpack encoding for StructType