http_constant/constant/
common.rs

1/// A single space character.
2///
3/// This constant is used to represent a space character in string
4/// or byte operations.
5pub static SPACE: &str = " ";
6
7/// The byte representation of a single space character.
8///
9/// This constant provides the byte equivalent of the space character
10/// for use in low-level operations.
11pub static SPACE_U8: u8 = SPACE.as_bytes()[0];
12
13/// A tab character.
14///
15/// This constant is used to represent a tab character in string
16/// or byte operations.
17pub static TAB: &str = "\t";
18
19/// The byte representation of a tab character.
20///
21/// This constant provides the byte equivalent of the tab character
22/// for use in low-level operations.
23pub static TAB_U8: u8 = TAB.as_bytes()[0];
24
25/// A line break character (newline).
26///
27/// This constant is used to represent a line break character in
28/// string or byte operations.
29pub static BR: &str = "\n";
30
31/// A static byte slice representation of the string `BR`.
32pub static BR_BYTES: &[u8] = BR.as_bytes();
33
34/// A colon followed by a space (`: `).
35///
36/// This constant is commonly used in formatted strings, such as
37/// headers or key-value pairs, where a colon and a space are needed.
38pub static COLON_SPACE: &str = ": ";
39
40/// The byte representation of the first character in the `COLON_SPACE`.
41///
42/// This constant provides the byte equivalent of the colon character
43/// from the `COLON_SPACE` string.
44pub static COLON_SPACE_BYTES: &[u8] = COLON_SPACE.as_bytes();
45
46/// A colon followed by a space symbol (`:`).
47///
48/// This constant is commonly used in formatted strings, such as
49/// headers or key-value pairs, where a colon and a space are needed.
50pub static COLON_SPACE_SYMBOL: &str = ":";
51
52/// Query symbols
53pub static QUERY_SYMBOL: &str = "?";
54
55/// Hash symbols
56pub static HASH_SYMBOL: &str = "#";
57
58/// Empty str
59pub static EMPTY_STR: &str = "";
60
61/// Default host
62pub static DEFAULT_HOST: &str = "0.0.0.0";
63
64/// Default web port
65pub static DEFAULT_WEB_PORT: usize = 80;
66
67/// Http br
68pub static HTTP_BR: &str = "\r\n";
69
70/// Http br bytes
71pub static HTTP_BR_BYTES: &[u8] = HTTP_BR.as_bytes();
72
73/// Http doubble br
74pub static HTTP_DOUBLE_BR: &str = "\r\n\r\n";
75
76/// Http doubble br bytes
77pub static HTTP_DOUBLE_BR_BYTES: &[u8] = HTTP_DOUBLE_BR.as_bytes();
78
79/// Default http path
80pub static DEFAULT_HTTP_PATH: &str = "/";
81
82/// Default http path bytes
83pub static DEFAULT_HTTP_PATH_BYTES: &[u8] = DEFAULT_HTTP_PATH.as_bytes();
84
85/// And
86pub static AND: &str = "&";
87
88/// And bytes
89pub static AND_BYTES: &[u8] = AND.as_bytes();
90
91/// Equal
92pub static EQUAL: &str = "=";
93
94/// Equa bytes
95pub static EQUAL_BYTES: &[u8] = EQUAL.as_bytes();
96
97/// Zero str
98pub static ZERO_STR: &str = "0";
99
100/// Zero str bytes
101pub static ZERO_STR_BYTES: &[u8] = ZERO_STR.as_bytes();
102
103/// Default buffer size
104pub static DEFAULT_BUFFER_SIZE: usize = 512_000;
105
106/// Default max redirect times
107pub static DEFAULT_MAX_REDIRECT_TIMES: usize = 8;
108
109/// Default timeout
110pub const DEFAULT_TIMEOUT: u64 = u64::MAX;
111
112/// Point
113pub const POINT: &str = ".";
114
115/// Root path
116pub const ROOT_PATH: &str = "/";
117
118/// Semicolon
119pub const SEMICOLON: &str = ";";
120
121/// Semicolon and space
122pub const SEMICOLON_SPACE: &str = "; ";
123
124/// OK
125pub static OK: &str = "OK";