pub fn wrap<M, F>(
        self,
        mw: F,
    ) -> NormalizedResource<
        impl NewService<
            Config = (),
            Request = ServiceRequest,
            Response = ServiceResponse,
            Error = Error,
            InitError = (),
        >,
    >
    where
        M: Transform<
            T::Service,
            Request = ServiceRequest,
            Response = ServiceResponse,
            Error = Error,
            InitError = (),
        >,
        F: IntoTransform<M, T::Service>,
    {
        let endpoint = apply_transform(mw, self.endpoint);
        NormalizedResource {
            endpoint,
            rdef: self.rdef,
            name: self.name,
            guards: self.guards,
            routes: self.routes,
            default: self.default,
            data: self.data,
            factory_ref: self.factory_ref,
            merge_slash: self.merge_slash,
        }
    }
/// Register a resource middleware.
///
/// This is similar to `App's` middlewares, but middleware get invoked on resource level.
/// Resource level middlewares are not allowed to change response
/// type (i.e modify response's body).
///
/// **Note**: middlewares get called in opposite order of middlewares registration.
Register a resource middleware.
This is similar to `App's` middlewares, but middleware get invoked on resource level.
Resource level middlewares are not allowed to change response
type .

Note**: middlewares get called in opposite order of middlewares registration.
Register a resource middleware . This is similar to ` App ' s ` middlewares but middleware get invoked on resource level . Resource level middlewares are not allowed to change response type . Note ** : middlewares get called in opposite order of middlewares registration .
pub fn wrap<M, F>(
        self,
        mw: F,
    ) -> NormalizedResource<
        impl NewService<
            Config = (),
            Request = ServiceRequest,
            Response = ServiceResponse,
            Error = Error,
            InitError = (),
        >,
    >
    where
        M: Transform<
            T::Service,
            Request = ServiceRequest,
            Response = ServiceResponse,
            Error = Error,
            InitError = (),
        >,
        F: IntoTransform<M, T::Service>,
    {
        let endpoint = apply_transform(mw, self.endpoint);
        NormalizedResource {
            endpoint,
            rdef: self.rdef,
            name: self.name,
            guards: self.guards,
            routes: self.routes,
            default: self.default,
            data: self.data,
            factory_ref: self.factory_ref,
            merge_slash: self.merge_slash,
        }
    }
pub fn wrap < M , F > ( self , mw : F , ) -> NormalizedResource < impl NewService < Config = ( ) , Request = ServiceRequest , Response = ServiceResponse , Error = Error , InitError = ( ) , > , > where M : Transform < T :: Service , Request = ServiceRequest , Response = ServiceResponse , Error = Error , InitError = ( ) , > , F : IntoTransform < M , T :: Service > , { let endpoint = apply_transform ( mw , self . endpoint ) ; NormalizedResource { endpoint , rdef : self . rdef , name : self . name , guards : self . guards , routes : self . routes , default : self . default , data : self . data , factory_ref : self . factory_ref , merge_slash : self . merge_slash , } }
Register a resource middleware.
Register a resource middleware .
self
mw
F