map

Applies a function to the expected value in an Expected object.

If no expected value is present, the original error value is passed through unchanged, and the function is not called.

template map(alias fun)
map
(
T
E
)
(
Expected!(T, E) self
)
if (
is(typeof(fun(self.value)))
)

Members

Functions

map
auto map(Expected!(T, E) self)

The actual map function.

Return Value

A new Expected object containing the result.

Meta