diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/README.md | 1 | ||||
| -rw-r--r-- | docs/pages/2-basic/2-setup.md | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/docs/README.md b/docs/README.md index 6dd9667..03e17dc 100644 --- a/docs/README.md +++ b/docs/README.md @@ -134,6 +134,7 @@ The Mingling project consists of two main parts: ## Example Projects - **[`examples/example-basic/`](examples/example-basic/src/main.rs)** - A simple "Hello, World!" example demonstrating the most basic usage of a Dispatcher and Renderer. +- **[`examples/example-async/`](examples/example-async/src/main.rs)** - Based on `example-basic`, demonstrates how to integrate an async runtime - **[`examples/example-picker/`](examples/example-picker/src/main.rs)** - Demonstrates how to use a Chain to process and transform command arguments. - **[`examples/example-general-renderer/`](examples/example-general-renderer/src/main.rs)** - Shows how to use a general renderer for different data types (e.g., JSON, YAML, TOML, RON). - **[`examples/example-completion/`](examples/example-completion/src/main.rs)** - An example implementing auto-completion for the shell. diff --git a/docs/pages/2-basic/2-setup.md b/docs/pages/2-basic/2-setup.md index 97fbc5a..102e213 100644 --- a/docs/pages/2-basic/2-setup.md +++ b/docs/pages/2-basic/2-setup.md @@ -15,12 +15,12 @@ It is defined as follows: ```rust struct MySetup; -impl ProgramSetup<ThisProgram, ThisProgram> +impl ProgramSetup<ThisProgram> for MySetup { fn setup( &mut self, - program: &mut Program<ThisProgram, ThisProgram> + program: &mut Program<ThisProgram> ) { // Your setup logic } @@ -89,7 +89,7 @@ If you find the above declaration method too **verbose**, you can use the `progr ```rust #[program_setup] fn my_setup( - program: &mut Program<ThisProgram, ThisProgram> + program: &mut Program<ThisProgram> ) { // Your setup logic } @@ -127,7 +127,7 @@ dispatcher!("member.rm", #[program_setup] fn my_setup( - program: &mut Program<ThisProgram, ThisProgram> + program: &mut Program<ThisProgram> ) { program.with_dispatcher(AddMemberCommand); program.with_dispatcher(RemoveMemberCommand); |
