Template to determine if hook provides function called when value is set.
struct Hook { static int lastValue; static void onValueSet(T)(auto ref T val) { lastValue = val; } } static assert(hasOnValueSet!(Hook, int)); auto res = ok!(string, Hook)(42); assert(res.hasValue); assert(Hook.lastValue == 42);
See Implementation
Template to determine if hook provides function called when value is set.