1 2 3 4 5 6 7 8 9
extension {{ name }}WireValue on {{ name }} { /// The exact serde wire value for this variant. String get wireValue { switch (this) { {% for variant in variants %} case {{ name }}.{{ variant.vname }}: return '{{ variant.wire }}'; {% endfor %} } } }