From 4d9a71d5737f9c090bd4f9d9b006b96f9362d2ea Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Sun, 2 Aug 2026 19:58:41 +0800 Subject: feat: add docs.rs generated program documentation module --- mingling/src/docs/gen_program.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 mingling/src/docs/gen_program.md (limited to 'mingling/src/docs') 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!(); +``` -- cgit