hyperlane-core 21.14.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
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use super::*;

/// The wire protocol a server connection speaks.
///
/// The variant is selected at runtime from the server configuration, never at
/// compile time: one binary serves every protocol it is configured for.
#[derive(Clone, Copy, Debug, Default, Deserialize, DisplayDebug, Eq, PartialEq, Serialize)]
#[serde(rename_all = "snake_case")]
pub enum ServerProtocol {
    /// HTTP/1.0 and HTTP/1.1 over a plain or TLS terminated byte stream.
    #[default]
    Http1,
    /// HTTP/2, either with prior knowledge over a plain socket or negotiated
    /// through `h2` ALPN over TLS.
    Http2,
    /// HTTP/3 over QUIC, which always terminates TLS inside its own handshake.
    Http3,
}