hyperlane 21.0.0

A lightweight, high-performance, and cross-platform Rust HTTP server library built on Tokio. It simplifies modern web service development by providing built-in support for middleware, WebSocket, Server-Sent Events (SSE), and raw TCP communication. With a unified and ergonomic API across Windows, Linux, and MacOS, it enables developers to build robust, scalable, and event-driven network applications with minimal overhead and maximum flexibility.
Documentation
use crate::*;

/// Represents the internal state of the application context.
///
/// This structure holds all the data associated with a single request-response cycle,
/// including the request, response, and any custom attributes.
#[derive(Clone, CustomDebug, Data, DisplayDebug)]
pub struct Context {
    /// The incoming HTTP request.
    #[get_mut(skip)]
    #[set(pub(crate))]
    pub(super) request: Request,
    /// The outgoing HTTP response.
    pub(super) response: Response,
    /// Parameters extracted from the route path.
    #[get_mut(skip)]
    #[set(pub(crate))]
    pub(super) route_params: RouteParams,
    /// A collection of custom attributes for sharing data within the request lifecycle.
    #[get_mut(pub(super))]
    #[set(pub(crate))]
    pub(super) attributes: ThreadSafeAttributeStore,
}