macro_rules! named_parameters {
( $vis:vis $param_name:ident { $($key:ident = $value:ty),* $(,)? }) => { ... };
}Expand description
Define a new type that implements ParseArguments
This can then be used in your custom Verb or Condition implementations.
Note: The definition uses = instead of the usual : to delimit fields and their types.
This is on purpose, as this may later be expanded to allow for positional arguments as well.
use test_dsl::named_parameters;
named_parameters! {
Frobnicator {
foo = usize,
name = String
}
}