pub fn with_route<S, M>(mut self, method: Method, pattern: S, middleware: M) -> Self
    where
        S: AsRef<str>,
        M: Middleware,
    {
        Arc::get_mut(&mut self.inner)
            .unwrap()
            .router
            .add_route(method, pattern, middleware);
        self
    }
/// Add a new route to the server.
Add a new route to the server.
Add a new route to the server .
pub fn with_route<S, M>(mut self, method: Method, pattern: S, middleware: M) -> Self
    where
        S: AsRef<str>,
        M: Middleware,
    {
        Arc::get_mut(&mut self.inner)
            .unwrap()
            .router
            .add_route(method, pattern, middleware);
        self
    }
pub fn with_route < S , M > ( mut self , method : Method , pattern : S , middleware : M ) -> Self where S : AsRef < str > , M : Middleware , { Arc :: get_mut ( & mut self . inner ) . unwrap ( ) . router . add_route ( method , pattern , middleware ) ; self }
Add a new route to the server.
Add a new route to the server .
mut self
method
Method
pattern
S
middleware
M
mut self
method
Method
pattern
S
middleware
M