is there any way, to reorder the params easily?
I want to have a common param order in my handlers (userid, dbs.., then params), but when I have a path param, I need to have the warp::path::param() first.
let get_all = warp::path!("all").and()......and_then(); let get_by_id = warp::path::param()...and()...and_then(); let profile = warp::path!("profile" / ..).and(get_all.or(get_by_id));
localhost/profile/all => get_all part
localhost/profile/demouser => get_by_id part, where my demouser is the String param
So in my get_by_id part, I have no path parts left, only my param - here the id: String -. I could place the path::param() in the chain later, but in that case how should I start my chain? A cannot use empty path, like warp::path!(""), or warp::path("").
But I cannot find any easy way to reorder my params.
Thank you in advance!