1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-23 16:21:06 +01:00

Add From<Payload> for crate::dev::Payload (#1110)

* Add From<Payload> for crate::dev::Payload

* Make dev::Payload field of Payload public and add into_inner method

* Add changelog entry
This commit is contained in:
Igor Aleksanov 2019-10-01 11:05:38 +03:00 committed by Nikolay Kim
parent 5169d306ae
commit f81ae37677
2 changed files with 14 additions and 1 deletions

View File

@ -1,5 +1,11 @@
# Changes
## [1.0.9] - 2019-xx-xx
### Added
* Add `Payload::into_inner` method and make stored `def::Payload` public. (#1110)
## [1.0.8] - 2019-09-25
### Added

View File

@ -43,7 +43,14 @@ use crate::request::HttpRequest;
/// );
/// }
/// ```
pub struct Payload(crate::dev::Payload);
pub struct Payload(pub crate::dev::Payload);
impl Payload {
/// Deconstruct to a inner value
pub fn into_inner(self) -> crate::dev::Payload {
self.0
}
}
impl Stream for Payload {
type Item = Bytes;