Expand description
This crate provides a library for event based simulation of application state, particularly useful for representing progress and choices in video games or similar applications.
The crate separates the simulation into two main components, the simulation info and the simulation state. The simulation info is immutable and defines the structure and rules of the simulation, while the simulation state is mutable and represents the current state of the simulation.
The crate provides various types and traits to facilitate the interaction with the simulation, such
as Simulation
, SimulationInfo
, BorrowedSimulation
, MultiSimulation
, and OwnedSimulation
.
For more detailed documentation and usage examples, please refer to the crate documentation or visit the repository.
Structs§
- Borrowed
Simulation - A borrowed simulation that holds an immutable reference to the simulation info and owns the simulation state.
- Call
- A type representing the forward direction for calling events in a simulation.
- Call
State - A temporary object for selecting an event to call.
- Generic
Simulation Borrow - A generic struct representing a borrowed simulation with an immutable or mutable reference to the state.
- Multi
Simulation - A simulation with support for multiple states.
- Multi
Simulation Edit - Helper type for safely editing the info of a multi simulation without invalidating the state.
- Owned
Simulation - An owned simulation that holds the simulation info and the simulation state.
- Owned
Simulation Edit - Helper type for safely editing the info of a owned simulation without invalidating the state.
- Revert
- A type representing the backward direction for reverting events in a simulation.
Enums§
- Dynamic
Simulation - A dynamic type, able to store simulation infos or editable simulations.
Traits§
- Editable
- A trait for types that can be safely edited without invalidating their associated states.
- Editable
Simulation Info - The
EditalbeSimulationInfo
trait provides an interface for editing the simulation while ensuring the state to stay valid. - Play
Direction - A trait representing a direction for calling or reverting events in a simulation.
- Simulation
- The
Simulation
trait provides an interface for interacting with a simulation. - Simulation
Info - The
SimulationInfo
trait provides an interface for interacting with a simulation.
Type Aliases§
- Simulation
Borrow - Represents a single immutable simulation.
- Simulation
Borrow Mut - Represents a single mutable simulation.