pub fn patch<H, R>(&mut self, path: &str, handler: H)
    where
        H: Fn(Request<Body>) -> R + Send + Sync + 'static,
        R: Future<Output = Result<Response<Body>, E>> + Send + Sync + 'static,
        E: Into<Box<dyn Error + Send + Sync>> + 'static,
    {
        let h = move |req| Box::pin(handler(req));
        let entry = self
            .inner
            .entry(Method::PATCH)
            .or_insert_with(InnerRouter::new);
        entry.add(path, Box::new(h));
    }
/// Register a handler for PATCH requests
Register a handler for PATCH requests
Register a handler for PATCH requests
pub fn patch<H, R>(&mut self, path: &str, handler: H)
    where
        H: Fn(Request<Body>) -> R + Send + Sync + 'static,
        R: Future<Output = Result<Response<Body>, E>> + Send + Sync + 'static,
        E: Into<Box<dyn Error + Send + Sync>> + 'static,
    {
        let h = move |req| Box::pin(handler(req));
        let entry = self
            .inner
            .entry(Method::PATCH)
            .or_insert_with(InnerRouter::new);
        entry.add(path, Box::new(h));
    }
pub fn patch < H , R > ( & mut self , path : & str , handler : H ) where H : Fn ( Request < Body > ) -> R + Send + Sync + ' static , R : Future < Output = Result < Response < Body > , E > > + Send + Sync + ' static , E : Into < Box < dyn Error + Send + Sync > > + ' static , { let h = move | req | Box :: pin ( handler ( req ) ) ; let entry = self . inner . entry ( Method :: PATCH ) . or_insert_with ( InnerRouter :: new ) ; entry . add ( path , Box :: new ( h ) ) ; }
Register a handler for PATCH requests
Register a handler for PATCH requests
&mut self
path
&str
handler
H
&mut self
path
&str
handler
H