Attribute Macro vararg::vararg[][src]

#[vararg]
Expand description

The whole point.

Creates variadic macro from function

Params

This proc-macro has 2 optional params:

  • name - specify name of the resulting macro (default: fn’s name). Name can be any suitable identifier
  • type - specify type of the last argument in function. Possible types:
    • array (this is the default type)
    • vec
    • slice

Params can be set like #[vararg(name = name1, type = array)], or with trailing comma: #[vararg(name = name2, type = vec,)]

Currently, you can change the value of the previously set param by setting it again like this: #[vararg(name = name1, type = array, name = name2)], but this behaviour may (and probably will) change in future