Expand description
This crate provides a safe and convenient Rust interface for simulating petri nets,
specifically designed for modeling non-linear plots in stories and games.
It builds upon the pns
crate, which is a low-level Rust binding to the petri net simulator written in C.
The crate extends the functionality of the pns
crate by providing a higher-level,
idiomatic Rust API that abstracts away the low-level details and ensures safe usage.
It allows you to easily create, modify, and simulate petri nets using a more expressive and Rust-friendly interface.
Structs§
- EditNet
- A wrapper type for net which only supports safe edits.
- Petri
NetInfo - A wrapper type representing petri net for simulation.
- State
Loading Error - An error that occurs when loading a petri net state.
Enums§
- Dynamic
NetEdit - A type for editing a dynamic net safely.
Traits§
- Simulation
Extensions - Extension trait for the petri net simulation.
Functions§
- maximum_
fire_ count - Calculate how often a transaction could theoretically be fired.
- maximum_
unfire_ count - Calculate how often a transaction could theoretically be unfired.
Type Aliases§
- Borrowed
Petri NetSimulation - A borrowed petri net simulation that holds an immutable reference to the petri net info and owns the simulation state.
- Dynamic
Net - Represents a dynamic net.
- Multi
Petri NetEdit - Helper type for safely editing the info of a multi petri net simulation without invalidating the state.
- Multi
Petri NetSimulation - A petri net simulation with support for multiple states.
- Petri
NetEdit - Helper type for safely editing the info of an owned petri net simulation without invalidating the state.
- Petri
NetSimulation - A basic petri net simulation that holds the petri net info and the simulation state.
- Petri
NetSimulation Borrow - Represents a single immutable petri net simulation.
- Petri
NetSimulation Borrow Mut - Represents a single mutable petri net simulation.