macro_rules! translate_enum {
($target:expr, $value:expr, $map:expr, $(
($method:ident, { $($str_val:literal => $variant:expr),* $(,)? })
),* $(,)?) => { ... };
}Expand description
Used to translate string values in serde_json::Value into enum variants
via DataPack<String>, avoiding a lot of duplicate match-and-build code.