pub struct Request {
pub method: Method,
pub target: Target,
pub version: Version,
pub headers: HashMap<String, String>,
}
Expand description
A HTTP request
Fields§
§method: Method
The request’s method
target: Target
The target URL of the method
version: Version
The HTTP version the client supports
headers: HashMap<String, String>
A type alias of a Hashmap containing a list of the headers of the Request
Implementations§
Source§impl Request
impl Request
Sourcepub fn new(parent: &mut Connection) -> Option<Self>
pub fn new(parent: &mut Connection) -> Option<Self>
Create a new Request
from a Connection
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 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