This generally wouldn't be a problem because you can omit the #[serde(deserialize_with = "my_deserializer")] on any unit variants, but I was trying to get this to work with a field_attribute in prost-build, so it was automatically being applied to every field in the enum.
when expanded has the visitor:
No matter what my_deserializer is, this results in "invalid type: unit variant, expected newtype variant". I tried
and
This generally wouldn't be a problem because you can omit the
#[serde(deserialize_with = "my_deserializer")]
on any unit variants, but I was trying to get this to work with a field_attribute in prost-build, so it was automatically being applied to every field in the enum.