macro_rules! optfield {
(
$(#[$attr:meta])*
$vis:vis struct $name:ident {
$(
$(#[$field_attr:meta])*
$field_vis:vis
$field:ident : $ty:ty
),* $(,)?
}
($new:ident)
) => { ... };
}Expand description
A macro to generate a new struct with fields wrapped in Option.