macro_rules! easy_argument_tuple {
(
$(#[$meta:meta])*
$vis:vis struct $name:ident {
$(#[$nmeta:meta])* $nvis:vis $nname:ident: $ntype:ty
$(, $(#[$fmeta:meta])* $fvis:vis $fname:ident: $ftype:ty)*
$(,)?
}
) => { ... };
}
Expand description
Defines argument structure.
First field is the argument name. It must implement EasyToken
.
It must be used to for EasyPeek
implementation.
The rest of the fields must be EasyArgumentField
and are expected to be in parenthesized and parsed in any order.
If name is not followed by parentheses, all fields are missing (which may be not an error for Option
and Vec
fields).
In case of errors, such as missing argument or unexpected duplicates, argument’s name and span will be used.