pub struct Request { /* private fields */ }Expand description
HTTP Request wrapper providing Laravel-like access to request data
Implementations§
Source§impl Request
impl Request
pub fn new(inner: Request<Incoming>) -> Self
pub fn with_params(self, params: HashMap<String, String>) -> Self
Sourcepub fn param(&self, name: &str) -> Result<&str, ParamError>
pub fn param(&self, name: &str) -> Result<&str, ParamError>
Get a route parameter by name (e.g., /users/{id})
Returns Err(ParamError) if the parameter is missing, enabling use of ? operator
Sourcepub fn is_inertia(&self) -> bool
pub fn is_inertia(&self) -> bool
Check if this is an Inertia XHR request
Sourcepub fn inertia_version(&self) -> Option<&str>
pub fn inertia_version(&self) -> Option<&str>
Get the Inertia version from request headers
Sourcepub fn inertia_partial_component(&self) -> Option<&str>
pub fn inertia_partial_component(&self) -> Option<&str>
Get partial component name for partial reloads
Sourcepub fn inertia_partial_data(&self) -> Option<Vec<&str>>
pub fn inertia_partial_data(&self) -> Option<Vec<&str>>
Get partial data keys for partial reloads
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