1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-31 08:57:00 +02:00

introduce custom FromRequest traint for conversion into Reply

This commit is contained in:
Nikolay Kim
2017-12-02 16:37:21 -08:00
parent 187948ddd1
commit 61744b68a1
6 changed files with 82 additions and 39 deletions

View File

@@ -83,6 +83,11 @@ impl HttpRequest<()> {
impl<S> HttpRequest<S> {
/// Construct new http request without state.
pub fn clone_without_state(&self) -> HttpRequest {
HttpRequest(Rc::clone(&self.0), Rc::new(()))
}
/// get mutable reference for inner message
fn as_mut(&mut self) -> &mut HttpMessage {
let r: &HttpMessage = self.0.as_ref();