Rust macros for general-purpose syntax sugar.
One of the great uses of macros in Rust is to provide new, convenient syntax to improve code readability and reduce boilerplate. Generally each library provides its own helpful macros that apply to just that library's types, but there are other things we can use macros for as well.
Rustcane is a collection of macros that are general-purpose that provide some sort of code improvement, like concise syntax for common logic or for generating similar struct types. At worst, some may rely on types in the standard library; others may not rely on any types at all.
Here's a brief list of macros currently provided:
- `lets!`: Flatten a pile of nested pattern matching into a series of sequential statements.