pub struct NextRequest {
pub method: String,
pub url: String,
pub path: String,
pub query: HashMap<String, String>,
pub headers: HashMap<String, String>,
pub cookies: HashMap<String, String>,
pub geo: Option<GeoData>,
pub ip: Option<String>,
}Fields§
§method: String§url: String§path: String§query: HashMap<String, String>§headers: HashMap<String, String>§geo: Option<GeoData>§ip: Option<String>Implementations§
Source§impl NextRequest
impl NextRequest
pub fn new(method: impl Into<String>, url: impl Into<String>) -> Self
pub fn with_header( self, key: impl Into<String>, value: impl Into<String>, ) -> Self
pub fn with_ip(self, ip: impl Into<String>) -> Self
pub fn header(&self, key: &str) -> Option<&String>
pub fn query_param(&self, key: &str) -> Option<&String>
pub fn next_url(&self) -> NextUrl
Trait Implementations§
Source§impl Clone for NextRequest
impl Clone for NextRequest
Source§fn clone(&self) -> NextRequest
fn clone(&self) -> NextRequest
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 moreAuto Trait Implementations§
impl Freeze for NextRequest
impl RefUnwindSafe for NextRequest
impl Send for NextRequest
impl Sync for NextRequest
impl Unpin for NextRequest
impl UnwindSafe for NextRequest
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