result

Undocumented in source. Be warned that the author may not have intended to support it.
  1. auto result(Optional!T optional, E err)
    result
    (
    E
    T
    )
    (
    auto ref scope Optional!T optional
    ,
    E err
    )
  2. auto result(Optional!T optional)

Examples

assert(Optional!int.some(3).result("failure") == 3.ok);
assert(Optional!int.none.result("failure") == "failure".err);

Meta