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:
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user