pub struct HttpRequest {
pub args: Option<String>,
pub http_headers: Vec<HttpHeader>,
pub http_method: Option<HttpRequestHttpMethod>,
pub length: Option<i64>,
pub referrer: Option<String>,
pub uid: Option<String>,
pub url: Option<Url>,
pub user_agent: Option<String>,
pub version: Option<String>,
pub x_forwarded_for: Vec<String>,
}
Expand description
HttpRequest
JSON schema
{
"type": "object",
"properties": {
"args": {
"type": "string"
},
"http_headers": {
"type": "array",
"items": {
"$ref": "#/$defs/http_header"
}
},
"http_method": {
"type": "string",
"enum": [
"OPTIONS",
"GET",
"HEAD",
"POST",
"PUT",
"DELETE",
"TRACE",
"CONNECT"
]
},
"length": {
"type": "integer"
},
"referrer": {
"type": "string"
},
"uid": {
"type": "string"
},
"url": {
"$ref": "#/$defs/url"
},
"user_agent": {
"type": "string"
},
"version": {
"type": "string"
},
"x_forwarded_for": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
Fields§
§args: Option<String>
§http_headers: Vec<HttpHeader>
§http_method: Option<HttpRequestHttpMethod>
§length: Option<i64>
§referrer: Option<String>
§uid: Option<String>
§url: Option<Url>
§user_agent: Option<String>
§version: Option<String>
§x_forwarded_for: Vec<String>
Implementations§
Source§impl HttpRequest
impl HttpRequest
pub fn builder() -> HttpRequest
Trait Implementations§
Source§impl Clone for HttpRequest
impl Clone for HttpRequest
Source§fn clone(&self) -> HttpRequest
fn clone(&self) -> HttpRequest
Returns a duplicate of the value. Read more
1.0.0 · 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 HttpRequest
impl Debug for HttpRequest
Source§impl<'de> Deserialize<'de> for HttpRequest
impl<'de> Deserialize<'de> for HttpRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<&HttpRequest> for HttpRequest
impl From<&HttpRequest> for HttpRequest
Source§fn from(value: &HttpRequest) -> Self
fn from(value: &HttpRequest) -> Self
Converts to this type from the input type.
Source§impl From<HttpRequest> for HttpRequest
impl From<HttpRequest> for HttpRequest
Source§fn from(value: HttpRequest) -> Self
fn from(value: HttpRequest) -> Self
Converts to this type from the input type.
Source§impl Serialize for HttpRequest
impl Serialize for HttpRequest
Source§impl TryFrom<HttpRequest> for HttpRequest
impl TryFrom<HttpRequest> for HttpRequest
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: HttpRequest) -> Result<Self, ConversionError>
fn try_from(value: HttpRequest) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for HttpRequest
impl RefUnwindSafe for HttpRequest
impl Send for HttpRequest
impl Sync for HttpRequest
impl Unpin for HttpRequest
impl UnwindSafe for HttpRequest
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