Skip to content

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

Instance Properties

  • config
    Configured options such as case-sensitivity.

Instance Methods

Relationships

Conforms To