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:
parent
5169d306ae
commit
f81ae37677
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user