diff --git a/editoast/editoast_schemas/src/infra.rs b/editoast/editoast_schemas/src/infra.rs index 681c2501cae..dce8ad4be8b 100644 --- a/editoast/editoast_schemas/src/infra.rs +++ b/editoast/editoast_schemas/src/infra.rs @@ -1,3 +1,4 @@ +mod applicable_directions; mod direction; mod directional_track_range; mod side; @@ -6,6 +7,7 @@ mod track_offset; mod track_range; mod waypoint; +pub use applicable_directions::ApplicableDirections; pub use direction::Direction; pub use directional_track_range::DirectionalTrackRange; pub use side::Side; diff --git a/editoast/editoast_schemas/src/infra/applicable_directions.rs b/editoast/editoast_schemas/src/infra/applicable_directions.rs new file mode 100644 index 00000000000..c0d50107835 --- /dev/null +++ b/editoast/editoast_schemas/src/infra/applicable_directions.rs @@ -0,0 +1,13 @@ +use derivative::Derivative; +use serde::Deserialize; +use serde::Serialize; + +#[derive(Debug, Derivative, Copy, Clone, Deserialize, Serialize, PartialEq, Eq)] +#[derivative(Default)] +#[serde(rename_all = "SCREAMING_SNAKE_CASE")] +pub enum ApplicableDirections { + StartToStop, + StopToStart, + #[derivative(Default)] + Both, +} diff --git a/editoast/src/converters/osm_to_railjson.rs b/editoast/src/converters/osm_to_railjson.rs index f2695a1087b..dd8be13b895 100644 --- a/editoast/src/converters/osm_to_railjson.rs +++ b/editoast/src/converters/osm_to_railjson.rs @@ -127,6 +127,7 @@ pub fn parse_osm(osm_pbf_in: PathBuf) -> Result TrackMap {