aboutsummaryrefslogtreecommitdiff
path: root/mingling/src/docs
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-08-02 19:58:41 +0800
committer魏曹先生 <1992414357@qq.com>2026-08-02 19:58:41 +0800
commit4d9a71d5737f9c090bd4f9d9b006b96f9362d2ea (patch)
tree730e824c78991139741d91a4a6fd82c31d8a7bd1 /mingling/src/docs
parentc0372a0415971a4e2ebdc1ba290a4a168f075794 (diff)
feat: add docs.rs generated program documentation module
Diffstat (limited to 'mingling/src/docs')
-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!();
+```