Expand description
HTTP handling traits and types for asynchronous services.
This module provides traits and types for implementing HTTP handlers that can be used with asynchronous services. It defines a common interface for processing HTTP requests and generating responses, with support for connection management and context-aware handling.
§Key Components
HttpHandler: A trait for implementing HTTP request handlers.ResponseWithContinue: A type alias for responses that indicate whether to continue processing the connection.HttpAccept: A type alias for connection acceptance information.
§Usage
The HttpHandler trait is automatically implemented for types
that implement the Service trait with
request type (Request<B>, CX) and return type
ResponseWithContinue.
Traits§
- Http
Handler - A trait for HTTP request handlers.
Type Aliases§
- Http
Accept - A tuple representing an accepted HTTP connection with its context.
- Response
With Continue - A tuple representing an HTTP response along with a connection continuation flag.