macro_rules! args {
() => { ... };
($($arg:tt)*) => { ... };
}
Expand description
An utility macro to create arguments for function calls.
This creates a slice of values on the stack which can be
passed to call
,
call_method
,
apply_filter
,
perform_test
or similar
APIs that take slices of values.
It supports both positional and keyword arguments.
To mark a parameter as keyword argument define it as
name => value
, otherwise just use value
.
value.call(state, args!(1, 2, foo => "bar"));
Note that this like context!
goes through
Value::from_serialize
.