mirror of
https://github.com/fafhrd91/actix-web
synced 2025-06-25 22:49:21 +02: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:
committed by
Nikolay Kim
parent
5169d306ae
commit
f81ae37677
@ -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;
|
||||
|
Reference in New Issue
Block a user