import Hummingbird /// A type exposing its endpoints as a route collection ready to be added to a router. /// /// Conforming controllers group related endpoints behind a single ``routes`` property, so the application composes them declaratively with /// ``Hummingbird/RouterMethods/addController(_:)``: /// /// ```swift /// struct HealthController: RouterController { /// var routes: RouteCollection { /// RouteCollection(context: Context.self) /// .get("health") { _, _ in HTTPResponse.Status.ok } /// } /// } /// /// router.addController { /// HealthController() /// } /// ``` public protocol RouterController: Sendable { // MARK: Associated types /// The request context the controller's routes operate on. associatedtype Context: RequestContext // MARK: Properties /// The collection of routes the controller exposes. var routes: RouteCollection { get } }