This module adds declares a mixin template for automatically generating class constructor. Generated constructor takes 1 argument per each field declared with @wired attribute. Later each argument gets assigned to its respective field.
An attribute to decorate fields about which wire should care
Mixin template that generates our class constructor
class A { @wired { int a; string b; float c; } mixin wire; } auto a = new A(1, "hi", 42.0); assert(a.a == 1 && a.b == "hi" && a.c == 42.0);
See Source File
This module adds declares a mixin template for automatically generating class constructor. Generated constructor takes 1 argument per each field declared with @wired attribute. Later each argument gets assigned to its respective field.