-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathrailjson.rs
36 lines (33 loc) · 1.2 KB
/
railjson.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
use derivative::Derivative;
use serde::Deserialize;
use serde::Serialize;
use super::TrackSection;
use editoast_schemas::infra::BufferStop;
use editoast_schemas::infra::Detector;
use editoast_schemas::infra::Electrification;
use editoast_schemas::infra::NeutralSection;
use editoast_schemas::infra::OperationalPoint;
use editoast_schemas::infra::Route;
use editoast_schemas::infra::Signal;
use editoast_schemas::infra::SpeedSection;
use editoast_schemas::infra::Switch;
use editoast_schemas::infra::SwitchType;
pub const RAILJSON_VERSION: &str = "3.4.11";
#[derive(Deserialize, Derivative, Serialize, Clone, Debug)]
#[derivative(Default)]
#[serde(deny_unknown_fields)]
pub struct RailJson {
#[derivative(Default(value = r#"RAILJSON_VERSION.to_string()"#))]
pub version: String,
pub operational_points: Vec<OperationalPoint>,
pub routes: Vec<Route>,
pub extended_switch_types: Vec<SwitchType>,
pub switches: Vec<Switch>,
pub track_sections: Vec<TrackSection>,
pub speed_sections: Vec<SpeedSection>,
pub neutral_sections: Vec<NeutralSection>,
pub electrifications: Vec<Electrification>,
pub signals: Vec<Signal>,
pub buffer_stops: Vec<BufferStop>,
pub detectors: Vec<Detector>,
}