aboutsummaryrefslogtreecommitdiff
path: root/src/macros.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/macros.rs')
-rw-r--r--src/macros.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/macros.rs b/src/macros.rs
index ce2c403..025e0dc 100644
--- a/src/macros.rs
+++ b/src/macros.rs
@@ -84,10 +84,15 @@ macro_rules! mount_file {
}
#[macro_export]
-macro_rules! batch_mount_page {
- ($router:ident,$(($path:literal, $description:literal, $file:literal),)*) => {
+macro_rules! batch_mount {
+ ("pages", $router:ident, $(($path:literal, $description:literal, $file:literal),)*) => {
$(
mount_page!($router, $path, $description, $file);
)*
};
+ ("files", $router:ident, $(($path:literal, $description:literal, $file:literal),)*) => {
+ $(
+ mount_file!($router, $path, $description, $file);
+ )*
+ };
}