mirror of
https://github.com/fafhrd91/actix-web
synced 2024-11-24 08:22:59 +01:00
make Message clonable and expose as public
This commit is contained in:
parent
b0e36fdcf9
commit
ed7ca7fe07
@ -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"
|
||||
|
||||
|
@ -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};
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user