http_type/response/type.rs
1use crate::*;
2
3/// The binary body of the HTTP response.
4pub type ResponseBody = Vec<u8>;
5/// The body of the HTTP response represented as a UTF-8 string.
6pub type ResponseBodyString = String;
7/// The key type used in HTTP response headers.
8pub type ResponseHeadersKey = String;
9/// A single value string for an HTTP response header.
10/// This represents one individual value that can be associated with a header key.
11pub type ResponseHeadersValueItem = String;
12/// An optional value string for an HTTP response header.
13pub type OptionResponseHeadersValueItem = Option<ResponseHeadersValueItem>;
14/// A collection of values for a single HTTP response header.
15pub type ResponseHeadersValue = VecDeque<ResponseHeadersValueItem>;
16/// A map of HTTP response headers.
17pub type ResponseHeaders = HashMapXxHash3_64<ResponseHeadersKey, ResponseHeadersValue>;
18/// The HTTP version of the response (e.g., "HTTP/1.1").
19pub type ResponseVersion = HttpVersion;
20/// The numeric status code of the HTTP response (e.g., 200, 404).
21pub type ResponseStatusCode = usize;
22/// The reason phrase associated with the HTTP status code (e.g., "OK", "Not Found").
23pub type ResponseReasonPhrase = String;
24/// The result type returned after writing an HTTP response.
25pub type ResponseResult = Result<(), ResponseError>;
26/// The full serialized binary content of the HTTP response.
27pub type ResponseData = Vec<u8>;
28/// The full serialized content of the HTTP response as a UTF-8 string.
29pub type ResponseDataString = String;
30/// A read guard to a shared `Response` value protected by `RwLock`.
31pub type RwLockReadGuardResponse<'a> = RwLockReadGuard<'a, Response>;
32/// A write guard to a shared `Response` value protected by `RwLock`.
33pub type RwLockWriteGuardResponse<'a> = RwLockWriteGuard<'a, Response>;
34/// An optional collection of values for a response header.
35pub type OptionResponseHeadersValue = Option<ResponseHeadersValue>;