http_type/http_version/type.rs
1/// Represents the HTTP version used in the request or response.
2///
3/// This enum is used to specify the HTTP version for HTTP requests and responses.
4/// It supports the two most common HTTP versions: HTTP/1.1 and HTTP/2. The `HttpVersion`
5/// enum allows for easy comparison, cloning, and debugging of the HTTP version.
6///
7/// The variants include:
8/// - `HTTP1_1`: Represents HTTP version 1.1.
9/// - `HTTP2`: Represents HTTP version 2.0.
10#[derive(Debug, Clone, PartialEq, Eq)]
11pub enum HttpVersion {
12 /// HTTP version 1.1
13 HTTP1_1,
14
15 /// HTTP version 2.0
16 HTTP2,
17
18 /// Unknown version
19 Unknown(String),
20}