macro_rules! dyn_route {
($name:ident, $($tt:tt)*) => { ... };
(
$name:ident<$data_ty:ty>,
$path:expr,
$method:ident,
|$($data:ident),*| -> $ret_type:ty $block:block
) => { ... };
}Expand description
Dynamic Route
A dynamic route matches if the start of the path matches the request uri.
If possible use the other macros.
Example
use fire::dyn_route;
type Data = ();
dyn_route! {
RouteName, "/files/", Get,
|_req| -> &'static str {
"Hello, World!"
}
}