macro_rules! route {
    ($name:ident, $($tt:tt)* ) => { ... };
    (
		$name:ident<$data_ty:ty>,
		|$check_req:ident| $check_block:block,
		|$req:ident| -> $ret_type:ty $block:block
	) => { ... };
    (
		$name:ident<$data_ty:ty>,
		|$check_req:ident| $check_block:block,
		|$req:ident, $( $data:ident ),*| -> $ret_type:ty
		$block:block
	) => { ... };
}
Expand description

Basic Route

If possible use the other macros.

Example

use fire::route;
use fire::routes::check_static;
 
type Data = ();
 
route! {
	RouteName,
	|req_header| {
		check_static(req_header.uri().path(), "/")
	},
	|_req| -> &'static str {
		"Hello, World!"
	}
}