Macro rouste::route_with[][src]

macro_rules! route_with {
    [$($route:expr),*] => { ... };
}

Compose a router given an URI and a list of routes.

route_with![route!(...), route!(...), route!(...)] is a function from &str to Option<T>. It will try to match each route sequentially and return the result of the first match. Otherwise it will return None.