fallback method

void fallback(
  1. Handler handler
)

Answers requests no route matched, instead of the default 404.

Read from the outermost router, as axum does for a top-level fallback.

Implementation

void fallback(Handler handler) {
  _requireOpen();
  internals.fallback = handler;
}