enum {type_name} {{ Schema(Box<{json_schema_props_type_name}>), {or_variant_name}({or_variant_type}), }} impl {local}DeepMerge for {type_name} {{ fn merge_from(&mut self, other: Self) {{ *self = other; }} }} impl<'de> {local}serde::Deserialize<'de> for {type_name} {{ fn deserialize(deserializer: D) -> Result where D: {local}serde::Deserializer<'de> {{ struct Visitor; impl<'de> {local}serde::de::Visitor<'de> for Visitor {{ type Value = {type_name}; fn expecting(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {{ f.write_str({type_name:?}) }} fn visit_map(self, map: A) -> Result where A: {local}serde::de::MapAccess<'de> {{ Ok({type_name}::Schema({local}serde::de::Deserialize::deserialize({local}serde::de::value::MapAccessDeserializer::new(map))?)) }} {or_visit} }} deserializer.deserialize_any(Visitor) }} }} impl {local}serde::Serialize for {type_name} {{ fn serialize(&self, serializer: S) -> Result where S: {local}serde::Serializer {{ match self {{ {type_name}::Schema(value) => value.serialize(serializer), {type_name}::{or_variant_name}(value) => value.serialize(serializer), }} }} }}