open-contracting / software-development-handbook

A guide for developers of OCP's tools
https://ocp-software-handbook.readthedocs.io/en/latest/
Other
4 stars 1 forks source link

Rust: When to use a macro or a function #83

Closed jpmckinney closed 1 year ago

jpmckinney commented 1 year ago

e.g. https://www.reddit.com/r/rust/comments/3e9teb/macros_vs_functions/

Also: accessible struct properties dynamically is not possible without adding a match statement like in https://stackoverflow.com/questions/65169079/how-to-access-struct-properties-dynamically.