mirror of
https://github.com/actix/actix-web.git
synced 2024-11-23 01:51:11 +00:00
ServiceRequest::parts_mut (#2177)
This commit is contained in:
parent
3b6333e65f
commit
8846808804
2 changed files with 8 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
## Unreleased - 2021-xx-xx
|
## Unreleased - 2021-xx-xx
|
||||||
### Added
|
### Added
|
||||||
|
* Add `ServiceRequest::parts_mut`. [#2177]
|
||||||
* Add extractors for `Uri` and `Method`. [#2263]
|
* Add extractors for `Uri` and `Method`. [#2263]
|
||||||
* Add extractor for `ConnectionInfo` and `PeerAddr`. [#2263]
|
* Add extractor for `ConnectionInfo` and `PeerAddr`. [#2263]
|
||||||
|
|
||||||
|
@ -9,6 +10,7 @@
|
||||||
* Change compression algorithm features flags. [#2250]
|
* Change compression algorithm features flags. [#2250]
|
||||||
* Deprecate `App::data` and `App::data_factory`. [#2271]
|
* Deprecate `App::data` and `App::data_factory`. [#2271]
|
||||||
|
|
||||||
|
[#2177]: https://github.com/actix/actix-web/pull/2177
|
||||||
[#2250]: https://github.com/actix/actix-web/pull/2250
|
[#2250]: https://github.com/actix/actix-web/pull/2250
|
||||||
[#2271]: https://github.com/actix/actix-web/pull/2271
|
[#2271]: https://github.com/actix/actix-web/pull/2271
|
||||||
[#2263]: https://github.com/actix/actix-web/pull/2263
|
[#2263]: https://github.com/actix/actix-web/pull/2263
|
||||||
|
|
|
@ -80,6 +80,12 @@ impl ServiceRequest {
|
||||||
(self.req, self.payload)
|
(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.
|
/// Construct request from parts.
|
||||||
pub fn from_parts(req: HttpRequest, payload: Payload) -> Self {
|
pub fn from_parts(req: HttpRequest, payload: Payload) -> Self {
|
||||||
Self { req, payload }
|
Self { req, payload }
|
||||||
|
|
Loading…
Reference in a new issue