Skip to content

Protocol

RouterBuilder

A protocol for building routers by registering routes with their associated outputs.
protocol RouterBuilder : Sendable

Overview

RouterBuilder provides a common interface for accumulating route registrations and building them into a complete router.

Topics

Associated Types

  • Output
    Type of value stored in routes.
  • Router
    The Router that gets built by this builder.

Instance Methods

  • build()
    Constructs a new Router based on the routes registered to this builder.
  • register(_:at:)
    Registers a new Output to the RouterBuilder at a given path.

Relationships

Inherits From

  • Swift.Sendable
  • Swift.SendableMetatype

Conforming Types