pub struct SimConfig {
pub schema_version: u32,
pub building: BuildingConfig,
pub elevators: Vec<ElevatorConfig>,
pub simulation: SimulationParams,
pub passenger_spawning: PassengerSpawnConfig,
}Expand description
Top-level simulation configuration, loadable from RON.
Validated at construction time by Simulation::new()
or SimulationBuilder::build().
Fields§
§schema_version: u32Schema version of this config. Use CURRENT_CONFIG_SCHEMA_VERSION
for new configs; 0 (the #[serde(default)]) marks a legacy
pre-versioning RON file. Validation rejects versions strictly
greater than the current version (forward-incompatible) and
surfaces a legacy_config: 0 reason for 0 so the consumer
has to opt in to running pre-versioning configs.
See docs/src/config-versioning.md for the bump policy.
building: BuildingConfigBuilding layout describing the stops (floors/stations) along the shaft.
elevators: Vec<ElevatorConfig>Elevator cars to install in the building.
Legacy flat list — used when building.lines is None.
When explicit lines are provided, elevators live inside each
LineConfig instead.
simulation: SimulationParamsGlobal simulation timing parameters.
passenger_spawning: PassengerSpawnConfigPassenger spawning parameters used by the game layer.
The core library does not consume these directly; they are stored here for games and traffic generators that read the config.
Trait Implementations§
Source§impl Default for SimConfig
impl Default for SimConfig
Source§fn default() -> Self
fn default() -> Self
A fresh SimConfig pinned to CURRENT_CONFIG_SCHEMA_VERSION.
Programmatically-built configs always start at the current
version; the legacy 0 marker is reserved for RON files that
pre-date the version field, where it surfaces via
#[serde(default)] on missing input.