pub struct HttpRequest {
pub method: String,
pub target: String,
pub cookie: Option<String>,
pub content_type: Option<String>,
pub headers: String,
pub body: Vec<u8>,
pub body_file_path: Option<String>,
pub body_len: usize,
pub is_multipart: bool,
}Expand description
Owned HTTP request data used by the runtime after parsing and body capture.
§Fields
method: Stored field onHttpRequest.target: Stored field onHttpRequest.cookie: Stored field onHttpRequest.content_type: Stored field onHttpRequest.headers: Stored field onHttpRequest.body: Stored field onHttpRequest.body_file_path: Stored field onHttpRequest.body_len: Stored field onHttpRequest.is_multipart: Stored field onHttpRequest.
§Examples
ⓘ
let _ = std::mem::size_of::<pharos_runtime_core::http::HttpRequest>();§Related
crate::httpfor constructors, helpers, and neighboring runtime types.
Fields§
§method: String§target: String§content_type: Option<String>§headers: String§body: Vec<u8>§body_file_path: Option<String>§body_len: usize§is_multipart: boolTrait 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 (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 HttpRequest
impl Debug for HttpRequest
Source§impl Default for HttpRequest
impl Default for HttpRequest
Source§fn default() -> HttpRequest
fn default() -> HttpRequest
Returns the “default value” for a type. Read more
Source§impl PartialEq for HttpRequest
impl PartialEq for HttpRequest
Source§fn eq(&self, other: &HttpRequest) -> bool
fn eq(&self, other: &HttpRequest) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for HttpRequest
impl StructuralPartialEq for HttpRequest
Auto Trait Implementations§
impl Freeze for HttpRequest
impl RefUnwindSafe for HttpRequest
impl Send for HttpRequest
impl Sync for HttpRequest
impl Unpin for HttpRequest
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.