pub struct Response { /* private fields */ }Implementations§
Source§impl Response
impl Response
pub fn add_default_header(name: &str, value: &str)
pub fn new() -> Self
pub fn json(&mut self, body: Value) -> Self
pub fn raw(&mut self, body: &str) -> Self
pub fn header(&mut self, name: &str, value: &str) -> &mut Self
pub fn status(&mut self, code: i32) -> &mut Self
pub fn get_body(&self) -> String
pub fn get_headers(&self) -> HashMap<String, String>
pub fn get_code(&self) -> i32
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