tryGet.tryGet

The actual tryGet function.

template tryGet(T)
version(D_Exceptions)
ref
T
tryGet
(
Self
)
(
auto ref Self self
)
if ()

Parameters

self Self

the SumType whose value is being accessed.

Return Value

Type: T

the SumType's value.

Throws

MatchException if the value does not have the expected type.

Meta