var.visitNogc

auto visitNogc(handlers...)() const @safe @nogc

visitNogc is a no-GC variant of visit.

It performs the same type-based dispatch as visit, but is annotated @nogc.

Notes:

  • Any chosen handler must also be @nogc.
  • var/const(var) fallback handlers are not used in @nogc dispatch.

    Parameters

    handlersOne or more callable handlers for different types.

    Returns

    The result of calling the matched handler, or R.init if no handler matches.