http_type/response/
type.rs1use crate::*;
2
3pub type ResponseBody = Vec<u8>;
5pub type ResponseBodyString = String;
7pub type ResponseHeadersKey = String;
9pub type ResponseHeadersValue = String;
11pub type ResponseHeaders = DashMap<ResponseHeadersKey, ResponseHeadersValue, RandomState>;
13pub type ResponseVersion = String;
15pub type ResponseStatusCode = usize;
17pub type ResponseReasonPhrase = String;
19pub type ResponseResult = Result<(), ResponseError>;
21pub type ResponseData = Vec<u8>;
23pub type ResponseDataString = String;
25
26#[derive(Debug, Clone, Lombok, DisplayDebug)]
35pub struct Response {
36 #[set(skip)]
37 pub(super) version: ResponseVersion,
38 pub(super) status_code: ResponseStatusCode,
39 #[set(skip)]
40 pub(super) reason_phrase: ResponseReasonPhrase,
41 pub(super) headers: ResponseHeaders,
42 #[set(skip)]
43 pub(super) body: ResponseBody,
44}