aboutsummaryrefslogtreecommitdiff
path: root/mingling/src/docs/gen_program.md
diff options
context:
space:
mode:
Diffstat (limited to 'mingling/src/docs/gen_program.md')
-rw-r--r--mingling/src/docs/gen_program.md19
1 files changed, 19 insertions, 0 deletions
diff --git a/mingling/src/docs/gen_program.md b/mingling/src/docs/gen_program.md
new file mode 100644
index 0000000..91e7b91
--- /dev/null
+++ b/mingling/src/docs/gen_program.md
@@ -0,0 +1,19 @@
+Types and implementations generated by the `gen_program!` macro
+
+> This module only exists on `docs.rs`, and describes the types generated by the `gen_program!` macro, which are located in the crate where you use Mingling, accessed via `crate::*`
+
+You can access them like this:
+
+```rust
+# pub struct ThisProgram;
+# impl ThisProgram { fn new() -> Self { ThisProgram } }
+// main.rs / lib.rs
+
+// Use them here via crate::*
+let mut program = crate::ThisProgram::new();
+
+// `ThisProgram` is generated here
+// |
+// vvvvvvvvvvvv
+// gen_program!();
+```