Structure
TrieRouterBuilder
TrieRouterBuilder provides an efficient way to build routing tables by accumulating route registrations and then constructing an immutable, thread-safe TrieRouter for fast lookups.struct TrieRouterBuilder<Output> where Output : Sendable
Configuration Options
.caseInsensitive: Enables case-insensitive route matching
Note: Route registration is cumulative - each call to register(_:at:) adds to the existing routes. Registering the same path twice will override the previous output.
Important: The builder uses immutable data structures internally, so route registration requires mutating access but the final router is completely immutable.
See Trie on Wikipedia for more information about the underlying data structure.
Topics
Initializers
init(_:config:logger:)Creates a newTrieRouterBuilder.
Instance Properties
configConfigured options such as case-sensitivity.
Instance Methods
build()Constructs a newTrieRouterbased on the routes registered to this builder.register(_:at:)Registers a new route to this router at a given path.
Relationships
Conforms To
RouterBuilderSwift.SendableSwift.SendableMetatype