pub struct Response {
pub status: String,
pub contents: Content,
pub len: String,
pub content_type: String,
}
Fields§
§status: String
§contents: Content
§len: String
§content_type: String
Implementations§
Source§impl Response
impl Response
pub fn new() -> Response
pub fn get(&mut self, status: String, contents: String, content_type: String)
pub fn put( &mut self, status: String, contents: String, content_type: String, file_path: String, content_for_file: String, )
pub fn head(&mut self, status: String, contents: String, content_type: String)
pub fn delete(&mut self, status: String, file_path: String)
pub fn options( &mut self, path: String, header: &String, process: fn(Request) -> Response, )
pub fn send(&mut self, stream: &TcpStream)
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