Function Function.withName

Return a new Function object with the name attribute set to value.

immutable(Function) withName (
  string value
) immutable;

Example

pure @nogc int answer();
mixin(refract!(answer, "answer").withName("ultimateAnswer").mixture);
static assert(
    __traits(getAttributes, ultimateAnswer) ==
    __traits(getAttributes, answer));