http_type/response/
type.rs1use super::error::Error as ResponseError;
2use crate::*;
3
4pub type ResponseBody = Vec<u8>;
6pub type ResponseHeadersKey = String;
8pub type ResponseHeadersValue = String;
10pub type ResponseHeaders = HashMap<ResponseHeadersKey, ResponseHeadersValue>;
12pub type ResponseVersion = String;
14pub type ResponseStatusCode = usize;
16pub type ResponseReasonPhrase = String;
18pub type ResponseResult = Result<(), ResponseError>;
20
21#[derive(Debug, Clone, Lombok, PartialEq, Eq, DisplayDebug)]
30pub struct Response {
31 #[set(skip)]
32 pub(super) version: ResponseVersion,
33 pub(super) status_code: ResponseStatusCode,
34 #[set(skip)]
35 pub(super) reason_phrase: ResponseReasonPhrase,
36 pub(super) headers: ResponseHeaders,
37 #[set(skip)]
38 pub(super) body: ResponseBody,
39}