Expected.apply

If this is an expected value (of type T) apply fun on it and return result, otherwise return current unexpected value (of type E).

struct Expected(T, E = Exception)
@trusted
Expected!(typeof(unaryFun!fun(T.init)), E)
apply
(
alias fun
)
()
if (
!isInstanceOf!(Unexpected, T) &&
!is(T == void)
)

See Also

Meta