pub struct Response {
pub status: i32,
pub body: String,
pub headers: String,
}Fields§
§status: i32§body: String§headers: StringImplementations§
source§impl Response
impl Response
pub fn set_status(&mut self, status: i32)
pub fn get_status(&self) -> i32
pub fn send_body(&mut self, body: String)
pub fn send_file(&mut self, path: &str)
pub fn get_body(&self) -> String
pub fn set_header(&mut self, headers: &HashMap<&str, &str>)
pub fn append_header(&mut self, headers: &HashMap<&str, &str>)
pub fn clear_header(&mut self)
pub fn set_string_header(&mut self, header: String)
pub fn append_string_header(&mut self, header: String)
pub fn get_header(&self) -> String
pub fn redirect(&mut self, path: &str)
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§
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