ok().Result.opCast
bool opCast(T : bool)() const @safe pure nothrow @nogcConverts to bool in condition contexts: if (result), !result, result && other, result ? a : b and assert(result).
The value is exactly ok(): it reports the active alternative and never inspects payload contents, so a Result!(bool, E) is true whenever it holds a success. The conversion is explicit; bool b = result; and passing a result to a bool parameter do not compile. Use ok() for a named boolean value.