pub struct Response {
pub version: Version,
pub status: Status,
pub header: Vec<KeyValuePair>,
pub content: Vec<u8>,
}
Expand description
Hyper Text Transfer Protocol Response.
Fields§
§version: Version
Protocol Version.
status: Status
Status Code.
header: Vec<KeyValuePair>
List of Header Key Value Pairs.
content: Vec<u8>
Content of Response.
Implementations§
Source§impl Response
impl Response
Sourcepub fn into_vector(self) -> Vec<u8> ⓘ
pub fn into_vector(self) -> Vec<u8> ⓘ
Consumes Response
and converts it to Vec<u8>
.
Sourcepub fn addHeader(self, key: String, value: String) -> Self
pub fn addHeader(self, key: String, value: String) -> Self
Add a header
-value to Response
in an OOP-Style.
§Arguments
key
– key of new header entry,value
– value of new header entry.
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe 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