diff --git a/CHANGES.md b/CHANGES.md index b984e68cc..4ff7d1e66 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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 diff --git a/src/types/payload.rs b/src/types/payload.rs index f33e2e5f1..8fc5f093e 100644 --- a/src/types/payload.rs +++ b/src/types/payload.rs @@ -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;