summaryrefslogtreecommitdiffstats
path: root/src/actix_ructe.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/actix_ructe.rs10
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)
+ }};
+}