aboutsummaryrefslogtreecommitdiff
path: root/src/macros.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-04-20 00:08:21 -0700
committerFuwn <[email protected]>2022-04-20 00:08:21 -0700
commit904ac81e7e754e87e0d64de59a75d38af63efdca (patch)
tree23387a69a3d66999eb40255b4b0ea46d78036860 /src/macros.rs
parentrefactor(main): create flexible rount mount timer (diff)
downloadlocus-904ac81e7e754e87e0d64de59a75d38af63efdca.tar.xz
locus-904ac81e7e754e87e0d64de59a75d38af63efdca.zip
refactor(macros): crate batch mount file macro
Diffstat (limited to 'src/macros.rs')
-rw-r--r--src/macros.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/macros.rs b/src/macros.rs
index 47a85cb..7d7761f 100644
--- a/src/macros.rs
+++ b/src/macros.rs
@@ -82,3 +82,12 @@ macro_rules! mount_file {
);
};
}
+
+#[macro_export]
+macro_rules! batch_mount_file {
+ ($router:ident,$(($path:literal, $description:literal, $file:literal),)*) => {
+ $(
+ mount_page!($router, $path, $description, $file);
+ )*
+ };
+}