http_type/response/struct.rs
1use crate::*;
2
3/// Represents an HTTP response.
4///
5/// # Fields
6/// - `version`: The HTTP version of the response.
7/// - `status_code`: The status code of the response.
8/// - `reason_phrase`: The reason phrase corresponding to the status code.
9/// - `headers`: A collection of HTTP headers as key-value pairs.
10/// - `body`: The binary body of the response.
11#[derive(Debug, Clone, Data, DisplayDebug)]
12pub struct Response {
13 #[set(skip)]
14 pub(super) version: ResponseVersion,
15 pub(super) status_code: ResponseStatusCode,
16 #[set(skip)]
17 pub(super) reason_phrase: ResponseReasonPhrase,
18 pub(super) headers: ResponseHeaders,
19 #[set(skip)]
20 pub(super) body: ResponseBody,
21}