http_type/request/type.rs
1use crate::*;
2
3/// An alias for `Method`, representing the HTTP request method.
4pub type RequestMethod = Method;
5
6/// An alias for `String`, representing the host part of an HTTP request.
7pub type RequestHost = String;
8
9/// An alias for `HttpVersion`, representing the HTTP version.
10pub type RequestVersion = HttpVersion;
11
12/// An alias for `String`, representing the path portion of the request URL.
13pub type RequestPath = String;
14
15/// An alias for `String`, representing the key type for request query parameters.
16pub type RequestQuerysKey = String;
17
18/// An alias for `String`, representing the value type for request query parameters.
19pub type RequestQuerysValue = String;
20
21/// An alias for `HashMapXxHash3_64<RequestQuerysKey, RequestQuerysValue>`, representing all query parameters parsed from the request URL.
22pub type RequestQuerys = HashMapXxHash3_64<RequestQuerysKey, RequestQuerysValue>;
23
24/// An alias for `Vec<u8>`, representing the raw binary body of the request.
25pub type RequestBody = Vec<u8>;
26
27/// An alias for `String`, representing the request body as a UTF-8 encoded string.
28pub type RequestBodyString = String;
29
30/// An alias for `String`, representing the key type for request headers.
31pub type RequestHeadersKey = String;
32
33/// An alias for `String`, representing a single value for an HTTP request header.
34pub type RequestHeadersValueItem = String;
35
36/// An alias for `VecDeque<RequestHeadersValueItem>`, representing a collection of values for a single HTTP request header.
37pub type RequestHeadersValue = VecDeque<RequestHeadersValueItem>;
38
39/// An alias for `HashMapXxHash3_64<RequestHeadersKey, RequestHeadersValue>`, representing all headers sent with the HTTP request.
40pub type RequestHeaders = HashMapXxHash3_64<RequestHeadersKey, RequestHeadersValue>;
41
42/// An alias for `RwLockReadGuard<'a, Request>`, representing a read guard for a `Request` wrapped in a `RwLock`.
43pub type RwLockReadGuardRequest<'a> = RwLockReadGuard<'a, Request>;
44
45/// An alias for `RwLockWriteGuard<'a, Request>`, representing a write guard for a `Request` wrapped in a `RwLock`.
46pub type RwLockWriteGuardRequest<'a> = RwLockWriteGuard<'a, Request>;