pub struct Response {
pub status: u16,
pub status_text: String,
pub proto: String,
pub proto_major: u8,
pub proto_minor: u8,
pub header: Header,
pub body: Option<Body>,
pub content_length: i64,
pub transfer_encoding: Vec<String>,
pub trailer: Header,
}Expand description
An HTTP response received by the client.
Mirrors Go’s http.Response.
Fields§
§status: u16Status code, e.g. 200.
status_text: StringReason phrase, e.g. “OK”.
proto: StringProtocol version, e.g. “HTTP/1.1”.
proto_major: u8§proto_minor: u8§header: HeaderResponse headers.
body: Option<Body>Response body.
content_length: i64-1 if unknown.
transfer_encoding: Vec<String>Transfer-Encoding values.
trailer: HeaderTrailer headers populated after the body is fully consumed.
Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Response
impl !Sync for Response
impl !UnwindSafe for Response
impl Freeze for Response
impl Send for Response
impl Unpin for Response
impl UnsafeUnpin for Response
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more