http_type/response/type.rs
1use crate::*;
2
3/// An alias for `Vec<u8>`, representing the binary body of the HTTP response.
4pub type ResponseBody = Vec<u8>;
5
6/// An alias for `String`, representing the body of the HTTP response as a UTF-8 string.
7pub type ResponseBodyString = String;
8
9/// An alias for `String`, representing the key type used in HTTP response headers.
10pub type ResponseHeadersKey = String;
11
12/// An alias for `String`, representing a single value string for an HTTP response header.
13pub type ResponseHeadersValueItem = String;
14
15/// An alias for `VecDeque<ResponseHeadersValueItem>`, representing a collection of values for a single HTTP response header.
16pub type ResponseHeadersValue = VecDeque<ResponseHeadersValueItem>;
17
18/// An alias for `HashMapXxHash3_64<ResponseHeadersKey, ResponseHeadersValue>`, representing a map of HTTP response headers.
19pub type ResponseHeaders = HashMapXxHash3_64<ResponseHeadersKey, ResponseHeadersValue>;
20
21/// An alias for `HttpVersion`, representing the HTTP version of the response.
22pub type ResponseVersion = HttpVersion;
23
24/// An alias for `usize`, representing the numeric status code of the HTTP response.
25pub type ResponseStatusCode = usize;
26
27/// An alias for `String`, representing the reason phrase associated with the HTTP status code.
28pub type ResponseReasonPhrase = String;
29
30/// An alias for `Vec<u8>`, representing the full serialized binary content of the HTTP response.
31pub type ResponseData = Vec<u8>;
32
33/// An alias for `String`, representing the full serialized content of the HTTP response as a UTF-8 string.
34pub type ResponseDataString = String;
35
36/// An alias for `RwLockReadGuard<'a, Response>`, representing a read guard to a shared `Response` value protected by `RwLock`.
37pub type RwLockReadGuardResponse<'a> = RwLockReadGuard<'a, Response>;
38
39/// An alias for `RwLockWriteGuard<'a, Response>`, representing a write guard to a shared `Response` value protected by `RwLock`.
40pub type RwLockWriteGuardResponse<'a> = RwLockWriteGuard<'a, Response>;