http_type/request/type.rs
1use super::*;
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 a single value of a request query parameter.
19///
20/// A query key may repeat (`?tag=a&tag=b`), so every key maps to a collection
21/// rather than to one value, which keeps the earlier values instead of dropping
22/// them on the floor the way a single-value map would.
23pub type RequestQuerysValueItem = String;
24
25/// An alias for `VecDeque<RequestQuerysValueItem>`, representing every value of one query parameter.
26pub type RequestQuerysValue = VecDeque<RequestQuerysValueItem>;
27
28/// An alias for `HashMapXxHash3_64<RequestQuerysKey, RequestQuerysValue>`, representing all query parameters parsed from the request URL.
29pub type RequestQuerys = HashMapXxHash3_64<RequestQuerysKey, RequestQuerysValue>;
30
31/// An alias for `Vec<u8>`, representing the raw binary body of the request.
32pub type RequestBody = Vec<u8>;
33
34/// An alias for `String`, representing the request body as a UTF-8 encoded string.
35pub type RequestBodyString = String;
36
37/// An alias for `String`, representing the key type for request headers.
38pub type RequestHeadersKey = String;
39
40/// An alias for `String`, representing a single value for an HTTP request header.
41pub type RequestHeadersValueItem = String;
42
43/// An alias for `VecDeque<RequestHeadersValueItem>`, representing a collection of values for a single HTTP request header.
44pub type RequestHeadersValue = VecDeque<RequestHeadersValueItem>;
45
46/// An alias for `HashMapXxHash3_64<RequestHeadersKey, RequestHeadersValue>`, representing all headers sent with the HTTP request.
47pub type RequestHeaders = HashMapXxHash3_64<RequestHeadersKey, RequestHeadersValue>;
48
49/// An alias for `RwLockReadGuard<'a, Request>`, representing a read guard for a `Request` wrapped in a `RwLock`.
50pub type RwLockReadGuardRequest<'a> = RwLockReadGuard<'a, Request>;
51
52/// An alias for `RwLockWriteGuard<'a, Request>`, representing a write guard for a `Request` wrapped in a `RwLock`.
53pub type RwLockWriteGuardRequest<'a> = RwLockWriteGuard<'a, Request>;