http-type 4.55.3

A comprehensive Rust library providing essential types for HTTP operations. Includes core HTTP abstractions (request/response, methods, status codes, versions), content types, cookies, WebSocket support, and thread-safe concurrent types (ArcMutex, ArcRwLock). Also provides convenient Option-wrapped primitive types for flexible HTTP handling.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
/// Represents different upgrade types.
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum UpgradeType {
    /// Represents an upgrade to the WebSocket protocol.
    WebSocket,
    /// Represents an upgrade to HTTP/2 cleartext (h2c).
    H2c,
    /// Represents a TLS upgrade, which is rare and experimental. It includes the specific TLS protocol string.
    Tls(String),
    /// Represents other custom or unknown upgrade protocols, including the protocol string.
    Unknown(String),
}