1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-07-01 12:15:08 +02: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

@ -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;