pub struct Request {
pub method: Method,
pub path: String,
pub query: HashMap<String, String>,
pub params: HashMap<String, String>,
pub headers: HashMap<String, String>,
pub data: HashMap<String, Value>,
pub body: Body,
pub plugins: Plugins,
}Fields§
§method: Method§path: String§query: HashMap<String, String>§params: HashMap<String, String>§headers: HashMap<String, String>§data: HashMap<String, Value>§body: Body§plugins: PluginsImplementations§
Source§impl Request
impl Request
Sourcepub fn get_header(&self, key: &str) -> Option<&str>
pub fn get_header(&self, key: &str) -> Option<&str>
pub fn get_method(&self) -> &Method
pub fn get_data(&self, key: &str) -> Option<&Value>
pub fn set_data<T>(&mut self, key: &str, value: T)where
T: Serialize,
pub fn get_typed_data<T>(&self, key: &str) -> Option<T>where
T: DeserializeOwned,
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