pub struct RawRequest {
pub method: String,
pub path: String,
pub query_string: String,
pub headers: Headers,
pub body: Vec<u8>,
}Expand description
One HTTP request as it arrives from a server, before it is decoded.
Fields§
§method: StringHTTP method.
path: StringRequest path, without the query string.
query_string: StringQuery string, without its leading ?.
headers: HeadersRequest headers.
body: Vec<u8>Raw request body.
Implementations§
Source§impl RawRequest
impl RawRequest
Sourcepub fn new<M: Into<String>, P: Into<String>>(method: M, path: P) -> Self
pub fn new<M: Into<String>, P: Into<String>>(method: M, path: P) -> Self
A request with a method and a path, and nothing else set.
Sourcepub fn with_query<S: Into<String>>(self, query_string: S) -> Self
pub fn with_query<S: Into<String>>(self, query_string: S) -> Self
The same request with a query string, without its leading ?.
Trait Implementations§
Source§impl Clone for RawRequest
impl Clone for RawRequest
Source§fn clone(&self) -> RawRequest
fn clone(&self) -> RawRequest
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RawRequest
impl Debug for RawRequest
Source§impl Default for RawRequest
impl Default for RawRequest
Source§fn default() -> RawRequest
fn default() -> RawRequest
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RawRequest
impl RefUnwindSafe for RawRequest
impl Send for RawRequest
impl Sync for RawRequest
impl Unpin for RawRequest
impl UnsafeUnpin for RawRequest
impl UnwindSafe for RawRequest
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