Protocolhummingbird 2.10.0Hummingbird
MiddlewareProtocol
Middleware protocol with generic input, context and output types
protocol MiddlewareProtocol<Input, Output, Context> : Sendable
Browse conforming typesMiddleware protocol with generic input, context and output types
protocol MiddlewareProtocol<Input, Output, Context> : Sendable
import Hummingbird
associatedtype Input
associatedtype Output
associatedtype Context
protocol Sendable
func handle(_ input: Input, context: Context, next: (Input, Context) async throws -> Output) async throws -> Output
protocol RouterMiddleware<Context> : MiddlewareProtocol where Self.Input == Request, Self.Output == Response
Middleware protocol with Request as input and Response as output