1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-09-09 05:08:32 +00:00

make Message clonable and expose as public

This commit is contained in:
Nikolay Kim 2019-02-07 21:50:20 -08:00
parent b0e36fdcf9
commit ed7ca7fe07
3 changed files with 11 additions and 1 deletions

View file

@ -11,7 +11,7 @@ documentation = "https://actix.rs/api/actix-http/stable/actix_http/"
categories = ["network-programming", "asynchronous",
"web-programming::http-server",
"web-programming::websocket"]
license = "MIT/Apache-2.0"
license = "Apache-2.0"
exclude = [".gitignore", ".travis.yml", ".cargo/config", "appveyor.yml"]
edition = "2018"

View file

@ -94,6 +94,7 @@ pub use self::config::{KeepAlive, ServiceConfig, ServiceConfigBuilder};
pub use self::error::{Error, ResponseError, Result};
pub use self::extensions::Extensions;
pub use self::httpmessage::HttpMessage;
pub use self::message::{Message, RequestHead, ResponseHead};
pub use self::request::Request;
pub use self::response::Response;
pub use self::service::{SendError, SendResponse};

View file

@ -169,6 +169,15 @@ impl<T: Head> Message<T> {
}
}
impl<T: Head> Clone for Message<T> {
fn clone(&self) -> Self {
Message {
inner: self.inner.clone(),
pool: self.pool,
}
}
}
impl<T: Head> std::ops::Deref for Message<T> {
type Target = T;