Struct thruster::Response [−][src]
pub struct Response { pub response: Vec<u8>, pub status_message: StatusMessage, pub header_raw: BytesMut, }
Fields
response: Vec<u8>
status_message: StatusMessage
header_raw: BytesMut
Methods
impl Response
[src]
impl Response
pub fn new() -> Response
[src]
pub fn new() -> Response
pub fn status_code(&mut self, code: u32, message: &str) -> &mut Response
[src]
pub fn status_code(&mut self, code: u32, message: &str) -> &mut Response
pub fn header(&mut self, name: &str, val: &str) -> &mut Response
[src]
pub fn header(&mut self, name: &str, val: &str) -> &mut Response
pub fn header_raw(&mut self, buf: &BytesMut) -> &mut Response
[src]
pub fn header_raw(&mut self, buf: &BytesMut) -> &mut Response
pub fn body(&mut self, s: &str) -> &mut Response
[src]
pub fn body(&mut self, s: &str) -> &mut Response
pub fn body_bytes(&mut self, b: &[u8]) -> &mut Response
[src]
pub fn body_bytes(&mut self, b: &[u8]) -> &mut Response