{{ derives }}
#[serde(tag = "{{ tag_field }}", content = "{{ content_field }}")]
pub enum {{ name }} {
{%- for variant in variants %}
{%- match variant %}
{%- when UnionVariantTemplate::Unit with (name) %}
    {{ name }},
{%- when UnionVariantTemplate::Newtype with { name, type_str } %}
    {{ name }}({{ type_str|safe }}),
{%- endmatch %}
{%- endfor %}
}

