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/// The value type used in HTTP response headers.
10pub type ResponseHeadersValue = String;
11/// A map of HTTP response headers.
12pub type ResponseHeaders = HashMapXxHash3_64<ResponseHeadersKey, ResponseHeadersValue>;
13/// The HTTP version of the response (e.g., "HTTP/1.1").
14pub type ResponseVersion = HttpVersion;
15/// The numeric status code of the HTTP response (e.g., 200, 404).
16pub type ResponseStatusCode = usize;
17/// The reason phrase associated with the HTTP status code (e.g., "OK", "Not Found").
18pub type ResponseReasonPhrase = String;
19/// The result type returned after writing an HTTP response.
20pub type ResponseResult = Result<(), ResponseError>;
21/// The full serialized binary content of the HTTP response.
22pub type ResponseData = Vec<u8>;
23/// The full serialized content of the HTTP response as a UTF-8 string.
24pub type ResponseDataString = String;
25/// A read guard to a shared `Response` value protected by `RwLock`.
26pub type RwLockReadGuardResponse<'a> = RwLockReadGuard<'a, Response>;
27/// A write guard to a shared `Response` value protected by `RwLock`.
28pub type RwLockWriteGuardResponse<'a> = RwLockWriteGuard<'a, Response>;
29/// An optional value of a response header.
30pub type OptionResponseHeadersValue = Option<ResponseHeadersValue>;