A reference to an object, interface, associative array, or an array slice to initialize the Rebindable with.
A newly constructed Rebindable initialized with the given reference.
1 class C 2 { 3 int payload; 4 this(int p) { payload = p; } 5 } 6 const c = new C(1); 7 8 auto c2 = c.rebindable; 9 assert(c2.payload == 1); 10 // passing Rebindable to rebindable 11 c2 = c2.rebindable; 12 13 c2 = new C(2); 14 assert(c2.payload == 2); 15 16 const c3 = c2.get; 17 assert(c3.payload == 2);
Convenience function for creating a Rebindable using automatic type inference.