Function.setBody

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

struct Function
immutable(Function)
setBody
(
string value
)

Examples

pure int answer();
mixin(
  refract!(answer, "answer").setName("theAnswer")
  .setBody("{ return 42; }")
  .mixture);
static assert(theAnswer() == 42);

Meta