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/// An alias for `String`, representing the body of the HTTP response as a UTF-8 string.
6pub type ResponseBodyString = String;
7/// An alias for `String`, representing the key type used in HTTP response headers.
8pub type ResponseHeadersKey = String;
9/// An alias for `String`, representing a single value string for an HTTP response header.
10pub type ResponseHeadersValueItem = String;
11/// An alias for `Option<ResponseHeadersValueItem>`, representing an optional value string for an HTTP response header.
12pub type OptionResponseHeadersValueItem = Option<ResponseHeadersValueItem>;
13/// An alias for `VecDeque<ResponseHeadersValueItem>`, representing a collection of values for a single HTTP response header.
14pub type ResponseHeadersValue = VecDeque<ResponseHeadersValueItem>;
15/// An alias for `HashMapXxHash3_64<ResponseHeadersKey, ResponseHeadersValue>`, representing a map of HTTP response headers.
16pub type ResponseHeaders = HashMapXxHash3_64<ResponseHeadersKey, ResponseHeadersValue>;
17/// An alias for `HttpVersion`, representing the HTTP version of the response.
18pub type ResponseVersion = HttpVersion;
19/// An alias for `usize`, representing the numeric status code of the HTTP response.
20pub type ResponseStatusCode = usize;
21/// An alias for `String`, representing the reason phrase associated with the HTTP status code.
22pub type ResponseReasonPhrase = String;
23/// An alias for `Result<(), ResponseError>`, representing the result type returned after writing an HTTP response.
24pub type ResponseResult = Result<(), ResponseError>;
25/// An alias for `Vec<u8>`, representing the full serialized binary content of the HTTP response.
26pub type ResponseData = Vec<u8>;
27/// An alias for `String`, representing the full serialized content of the HTTP response as a UTF-8 string.
28pub type ResponseDataString = String;
29/// An alias for `RwLockReadGuard<'a, Response>`, representing a read guard to a shared `Response` value protected by `RwLock`.
30pub type RwLockReadGuardResponse<'a> = RwLockReadGuard<'a, Response>;
31/// An alias for `RwLockWriteGuard<'a, Response>`, representing a write guard to a shared `Response` value protected by `RwLock`.
32pub type RwLockWriteGuardResponse<'a> = RwLockWriteGuard<'a, Response>;
33/// An alias for `Option<ResponseHeadersValue>`, representing an optional collection of values for a response header.
34pub type OptionResponseHeadersValue = Option<ResponseHeadersValue>;