Expand description
This crate provides procedural macros for meta-programming purposes to be used in concert with the ODEM-rs library.
It includes four main macros:
until: Parses a condition into aControlExprthat can be awaited.derive_config: Derives theConfigtrait for a structure, supporting customizations through attributes.derive_publisher: Generates thePublishertrait by subscribing to marked attributes.sim_main: Wraps a user-definedasync fnwith optional arguments and return values into a synchronous wrapper-function that initializes and runs a simulation, returning its results.
For more details, refer to the documentation of each macro.
Macros§
- until
- Creates a
ControlExprfrom a boolean expression, allowing asynchronous code to efficiently await a specific condition.
Attribute Macros§
- sim_
main - Generates a synchronous main function that sets up a simulator, runs the provided asynchronous simulation logic, and handles the results.