I think this would be quite brittle. It would only work with optional types if the supplied value It wouldn't work on non-active enum variants. And probably more. I think the schema to Rust code generation is a better path for this.
I think this would be quite brittle.
And probably more. I think the schema to Rust code generation is a better path for this.