[][src]Macro match_request::match_request

macro_rules! match_request {
    ($request_method:expr, $request_path:expr, {
        $($pattern:literal => {
            $($method:ident => $result:expr),* $(,)?
        }),* $(,)?
    }) => { ... };
}

Matches a request method and path against the provided patterns, returning the matched value (if any) and any captured parameters from the path.

Returns

Result<(T, match_request::Params), match_request::Error> where T is the type of the match arms.