Router

Imports for the router, available from swift-rust/router.

Functions

  • notFound() — throw a 404 from a page or layout
  • redirect(url) — 307 redirect
  • permanentRedirect(url) — 308 permanent redirect
  • revalidatePath(path) — purge a route's cache
  • revalidateTag(tag) — purge tagged cache entries

Classes

  • NotFoundError — thrown by notFound()
  • RedirectError — thrown by redirect()

Types

  • LayoutProps
  • PageProps
  • RouteHandler
  • RouteHandlerContext