-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
4,529 additions
and
649 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Adding a new modeling command | ||
|
||
- In `each_command.rs` add your new `struct MyNewCommand` with one field for each parameter the command has. | ||
- In `def_enum.rs` add a new variant of `ModelingCmd` with your type, e.g. `MyNewCommand(MyNewCommand)`. | ||
- If your command responds with data: | ||
- In `output.rs`, add a `struct MyNewCommand` following the existing examples. | ||
- Then scroll to the end of the file and `impl ModelingCmdOutput for MyNewCommand {}` | ||
- In `ok_response.rs` add your new type to the `build_enum!` macro. | ||
- In `impl_traits.rs` follow the examples to implement `ModelingCmdVariant` for your type `MyNewCommand` using either the `impl_variant_output!` or the `impl_variant_empty!` macro. If your command responds with data, use the former. If your command has no response, use the latter. |
Oops, something went wrong.