pub struct Request {
pub method: Method,
pub path: String,
pub query: String,
pub version: String,
pub headers: Vec<(String, String)>,
pub body: Vec<u8>,
pub peer: Option<String>,
}Expand description
A parsed HTTP request.
Fields§
§method: Method§path: StringPath with query string stripped, e.g. /users/42.
query: StringRaw query string without the ?, e.g. page=2&q=foo.
version: String§headers: Vec<(String, String)>§body: Vec<u8>§peer: Option<String>The peer socket address (ip:port), if known. Set by the server.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnsafeUnpin for Request
impl UnwindSafe for Request
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