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
Implementations
sourceimpl Response
impl Response
pub fn new() -> Response
pub fn status_code(&mut self, code: u32, message: &str) -> &mut Response
pub fn header(&mut self, name: &str, val: &str) -> &mut Response
pub fn body(&mut self, s: &str) -> &mut Response
pub fn body_bytes(&mut self, b: &[u8]) -> &mut Response
pub fn body_bytes_from_vec(&mut self, b: Vec<u8>) -> &mut Response
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more