mirror of https://github.com/fafhrd91/actix-web
ServiceRequest::parts_mut
This commit is contained in:
parent
427fe6bd82
commit
e5d3fd1f93
|
@ -86,6 +86,12 @@ impl ServiceRequest {
|
|||
(self.req, self.payload)
|
||||
}
|
||||
|
||||
/// Get mutable access to inner `HttpRequest` and `Payload`
|
||||
#[inline]
|
||||
pub fn parts_mut(&mut self) -> (&mut HttpRequest, &mut Payload) {
|
||||
(&mut self.req, &mut self.payload)
|
||||
}
|
||||
|
||||
/// Construct request from parts.
|
||||
pub fn from_parts(req: HttpRequest, payload: Payload) -> Self {
|
||||
Self { req, payload }
|
||||
|
|
Loading…
Reference in New Issue