Documentation
Dlang.org
mapOrElse.mapOrElse
expected
mapOrElse
The actual
mapOrElse
function.
template
mapOrElse
(alias valueOp, alias errorOp)
@
safe
auto
mapOrElse
(
T
E
H
)
(
auto
ref
Expected
!(
T
,
E
,
H
)
self
)
if
(
is
(
typeof
(
errorOp
(
self.error
))) &&
(
(
is
(
T
==
void
) &&
is
(
typeof
(
valueOp
()) ==
typeof
(
errorOp
(
self.error
)))
)
||
(
!
is
(
T
==
void
) &&
is
(
typeof
(
valueOp
(
self.value
)) ==
typeof
(
errorOp
(
self.error
)))
)
)
)
Parameters
self
Type:
Expected
!(
T
,
E
,
H
)
an
Expected
object
Meta
Source
See Implementation
expected
mapOrElse
functions
mapOrElse
The actual mapOrElse function.