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

allow scope level guards

This commit is contained in:
Nikolay Kim
2019-03-04 11:47:53 -08:00
parent 5c61321565
commit e442ddb167
4 changed files with 179 additions and 107 deletions

View File

@@ -8,7 +8,7 @@ use actix_http::{
Error, Extensions, HttpMessage, Payload, Request, RequestHead, Response,
ResponseHead,
};
use actix_router::{Path, Url};
use actix_router::{Path, Resource, Url};
use futures::future::{ok, FutureResult, IntoFuture};
use crate::request::HttpRequest;
@@ -137,6 +137,12 @@ impl<P> ServiceRequest<P> {
}
}
impl<P> Resource<Url> for ServiceRequest<P> {
fn resource_path(&mut self) -> &mut Path<Url> {
self.match_info_mut()
}
}
impl<P> HttpMessage for ServiceRequest<P> {
type Stream = P;