[][src]Macro duplicate::duplicate_inline

duplicate_inline!() { /* proc-macro */ }

Duplicates the given code and substitutes specific identifiers for different code snippets in each duplicate.

This is a function-like procedural macro version of duplicate. It's functionality is the exact same, and they share the same invocation syntax(es). The only difference is that duplicate_inline doesn't only duplicate the following item, but duplicate all code given to it after the invocation block.


A call to duplicate_inline must start with a [], {}, or () containing the duplication invocation. Everything after that will then be duplicated according to the invocation.

Given the following duplicate_inline call:

use duplicate::duplicate_inline;

    // Some duplication invocation
  // Some code to duplicate

It is equivalent to the following invocation using duplicate:

use duplicate::duplicate;

  // Some duplication invocation
// Some code to duplicate

For more details on about invocations and features see duplicate.