http_type/request/
struct.rs1use crate::*;
2
3#[derive(
9 Clone,
10 Copy,
11 Debug,
12 Deserialize,
13 DisplayDebug,
14 Eq,
15 Getter,
16 GetterMut,
17 PartialEq,
18 Serialize,
19 Setter,
20)]
21pub struct RequestConfigData {
22 #[get(type(copy))]
24 pub(super) buffer_size: usize,
25 #[get(type(copy))]
27 pub(super) max_request_line_size: usize,
28 #[get(type(copy))]
30 pub(super) max_path_size: usize,
31 #[get(type(copy))]
33 pub(super) max_query_size: usize,
34 #[get(type(copy))]
36 pub(super) max_header_line_size: usize,
37 #[get(type(copy))]
39 pub(super) max_header_count: usize,
40 #[get(type(copy))]
42 pub(super) max_header_key_size: usize,
43 #[get(type(copy))]
45 pub(super) max_header_value_size: usize,
46 #[get(type(copy))]
48 pub(super) max_body_size: usize,
49 #[get(type(copy))]
51 pub(super) max_ws_frame_size: usize,
52 #[get(type(copy))]
54 pub(super) max_ws_frames_count: usize,
55 #[get(type(copy))]
57 pub(super) http_read_timeout_ms: u64,
58 #[get(type(copy))]
60 pub(super) ws_read_timeout_ms: u64,
61}
62
63#[derive(Clone, CustomDebug, DisplayDebug, Getter)]
69pub struct RequestConfig(#[get(pub(super))] pub(super) ArcRwLock<RequestConfigData>);
70
71#[derive(
75 Clone, Debug, Deserialize, DisplayDebug, Eq, Getter, GetterMut, PartialEq, Serialize, Setter,
76)]
77pub struct Request {
78 pub(super) method: RequestMethod,
80 pub(super) host: RequestHost,
82 pub(super) version: RequestVersion,
84 pub(super) path: RequestPath,
86 pub(super) querys: RequestQuerys,
88 pub(super) headers: RequestHeaders,
90 pub(super) body: RequestBody,
92}
93
94#[derive(Clone, Copy, Debug, Default, Deserialize, Eq, New, PartialEq, Serialize)]
96pub(crate) struct Http;
97
98#[derive(Clone, Copy, Debug, Default, Deserialize, Eq, New, PartialEq, Serialize)]
100pub(crate) struct Ws;