diff options
author | cel 🌸 <cel@blos.sm> | 2023-10-04 19:55:17 +0100 |
---|---|---|
committer | cel 🌸 <cel@blos.sm> | 2023-10-04 19:59:53 +0100 |
commit | 5d395d4ed73061b247c32dc63db6ddfa2dd62d39 (patch) | |
tree | 084df0c83294123c6e884fa46d022f120ba5de86 /src/actix_ructe.rs | |
download | pinussy-5d395d4ed73061b247c32dc63db6ddfa2dd62d39.tar.gz pinussy-5d395d4ed73061b247c32dc63db6ddfa2dd62d39.tar.bz2 pinussy-5d395d4ed73061b247c32dc63db6ddfa2dd62d39.zip |
initial commit
Diffstat (limited to 'src/actix_ructe.rs')
-rw-r--r-- | src/actix_ructe.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/actix_ructe.rs b/src/actix_ructe.rs new file mode 100644 index 0000000..e6ba0db --- /dev/null +++ b/src/actix_ructe.rs @@ -0,0 +1,10 @@ +macro_rules! render { + ($template:path) => {{ + let mut buf = Vec::new(); + $template(&mut buf).map(|()| buf) + }}; + ($template:path, $($arg:expr),* $(,)*) => {{ + let mut buf = Vec::new(); + $template(&mut buf, $($arg),*).map(|()| buf) + }}; +} |