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