原书出处
Write Powerful Rust Macros
05 Hiding information and creating mini-DSLs with function-like macros 按改写范围选择宏
would be unwise. Surely it means something
that derive macros, the most limited of the three, are perhaps the most popular of the three: a limitation can also be a strength. For instance, derive macros are predictable in their effects, both for users and creators, since they only add without changing or deleting. So if you only want to add functionality to a struct or enum, and the problem is too complex for a declarative macro, you have already found the right
tool for the job.
原书定位详情
来源:a19c7933-4eda-4176-aebd-30fe7e1ad292
正文位置:extracted/Write Powerful Rust Macros/_epub-src/OEBPS/Text/chapter-5.xhtml#p90
EPUB SHA-256:68c7ed23324b44144895c3bb55f55731454da237867b66ec66ca6404f5b93661