aboutsummaryrefslogtreecommitdiff
path: root/doc/usage/invoke.rs
diff options
context:
space:
mode:
Diffstat (limited to 'doc/usage/invoke.rs')
-rw-r--r--doc/usage/invoke.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/usage/invoke.rs b/doc/usage/invoke.rs
new file mode 100644
index 0000000..0ae90d2
--- /dev/null
+++ b/doc/usage/invoke.rs
@@ -0,0 +1,10 @@
+#[func]
+fn compute(x: i32) -> i32 {
+ x * 2
+}
+
+#[func]
+fn example() -> i32 {
+ // invoke! macro should be used with #[func]
+ invoke!(compute(5))
+}