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

This commit is contained in:
Igor Aleksanov 2019-10-01 08:42:33 +03:00
parent ffacabda76
commit ab49f885d8
1 changed files with 5 additions and 4 deletions

View File

@ -43,11 +43,12 @@ use crate::request::HttpRequest;
/// );
/// }
/// ```
pub struct Payload(crate::dev::Payload);
pub struct Payload(pub crate::dev::Payload);
impl From<Payload> for crate::dev::Payload {
fn from(payload: Payload) -> Self {
payload.0
impl Payload {
/// Deconstruct to a inner value
pub fn into_inner(self) -> crate::dev::Payload {
self.0
}
}