decode

suspend fun <R, S> S.decode(block: (value: S) -> R, wrapError: (Exception) -> Error): Try<R, DecodeError>

Decodes receiver properly wrapping exceptions into DecodeErrors.