Macro rusty_pipe::url_for
[−]
[src]
macro_rules! url_for { ($request:expr, $route_id:expr $(,$key:expr => $value:expr)* $(,)*) => { ... }; }
Generate a URL based off of the requested one.
ⓘThis example is not tested
url_for!(request, "foo", "query" => "test", "extraparam" => "foo")
Is equivalent to:
ⓘThis example is not tested
router::url_for(request, "foo", { let mut rv = ::std::collections::HashMap::new(); rv.insert("query".to_owned(), "test".to_owned()); rv.insert("extraparam".to_owned(), "foo".to_owned()); rv })