diff options
| author | Fuwn <[email protected]> | 2022-04-20 00:08:21 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-04-20 00:08:21 -0700 |
| commit | 904ac81e7e754e87e0d64de59a75d38af63efdca (patch) | |
| tree | 23387a69a3d66999eb40255b4b0ea46d78036860 /src/macros.rs | |
| parent | refactor(main): create flexible rount mount timer (diff) | |
| download | locus-904ac81e7e754e87e0d64de59a75d38af63efdca.tar.xz locus-904ac81e7e754e87e0d64de59a75d38af63efdca.zip | |
refactor(macros): crate batch mount file macro
Diffstat (limited to 'src/macros.rs')
| -rw-r--r-- | src/macros.rs | 9 |
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); + )* + }; +} |