Skip to main content

hyperlane_core/config/
enum.rs

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