Function.withUdas

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

struct Function
withUdas
(
immutable(string)[] value
)

Examples

import std.typecons : tuple;
@(666) int answer();

mixin(
    refract!(answer, "answer")
    .withName("answerIs42")
    .withUdas(["@(42)"])
    .mixture);
static assert(__traits(getAttributes, answerIs42).length == 1);
static assert(__traits(getAttributes, answerIs42)[0] == 42);

Meta