#[macro_export] macro_rules! route { (get_html => $server: expr, $url: expr, $name: expr) => { $server.add_route( &Method::Get, $url, Box::new(|_| Res::File { name: $name, ct: "text/html; charset=utf-8", sc: 200, }), ); }; (get_js => $server: expr, $url: expr, $name: expr) => { $server.add_route( &Method::Get, $url, Box::new(|_| Res::File { name: $name, ct: "text/javascript; charset=utf-8", sc: 200, }), ); }; (get_css => $server: expr, $url: expr, $name: expr) => { $server.add_route( &Method::Get, $url, Box::new(|_| Res::File { name: $name, ct: "text/css; charset=utf-8", sc: 200, }), ); }; }