Skip to main content

variadic_func

Function variadic_func 

Source
fn variadic_func(
    func: &ItemFn,
    modifiers: Modifiers,
    struct_ty: Option<Path>,
    arena: bool,
    has_self: bool,
) -> Result<TokenStream>
Expand description

Produce an EagerVariadicFunc implementation.

Two modes based on whether the function has a &self receiver:

  • &self present: struct defined externally, generates method impl + trait impl + Display
  • No &self: generates unit struct + trait impl + Display + preserves original function