pub fn not_found<H, R>(&mut self, 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,
    {
        self.not_found = Some(Box::new(handler));
    }
/// Register a handler when no routes are matched
Register a handler when no routes are matched
Register a handler when no routes are matched
pub fn not_found<H, R>(&mut self, 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,
    {
        self.not_found = Some(Box::new(handler));
    }
pub fn not_found < H , R > ( & mut self , 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 , { self . not_found = Some ( Box :: new ( handler ) ) ; }
Register a handler when no routes are matched
Register a handler when no routes are matched
&mut self
handler
H
&mut self
handler
H