optfield-lite
A macro to generate a new struct with fields wrapped in Option. Lite version of optfield.
Usage
Recommended to work with macro_rules_attr, which provides nice syntactic sugar:
use optfield;
use apply;
/// My test struct
This will generate a struct OptTest with the following fields:
/// My test struct
Note that the generated struct will have the same attributes and visibility as the original struct. You can also use it directly, which produces the same result:
use optfield;
optfield!