Closed
Description
Describe the bug
When using the Form
derivation macro and specifying field names/enumeration tags etc, for example:
pub enum Envelope {
#[form(tag = "auth")]
Auth {
#[form(body)]
body: Option<Value>,
},
...
}
the macro will only work if them name is a literal. If a constant is specified:
const AUTH: &str = "auth";
pub enum Envelope {
#[form(tag = AUTH)]
Auth {
#[form(body)]
body: Option<Value>,
},
...
}
a compiler error is produced.
Expected behavior
The macro should accept a path to a constant string in addition to a literal.