Struct map_model::PermanentMapEdits
source · [−]pub struct PermanentMapEdits {
pub map_name: MapName,
pub edits_name: String,
pub version: usize,
commands: Vec<PermanentEditCmd>,
merge_zones: bool,
pub proposal_description: Vec<String>,
pub proposal_link: Option<String>,
}
Expand description
MapEdits are converted to this before serializing. Referencing things like LaneID in a Map won’t work if the basemap is rebuilt from new OSM data, so instead we use stabler OSM IDs that’re less likely to change.
Fields
map_name: MapName
edits_name: String
version: usize
commands: Vec<PermanentEditCmd>
merge_zones: bool
If false, adjacent roads with the same AccessRestrictions will not be merged into the same Zone; every Road will be its own Zone. This is used to experiment with a per-road cap. Note this is a map-wide setting.
proposal_description: Vec<String>
Edits without these are player generated.
proposal_link: Option<String>
The link is optional even for proposals
Implementations
sourceimpl PermanentMapEdits
impl PermanentMapEdits
sourcepub fn into_edits(self, map: &Map) -> Result<MapEdits>
pub fn into_edits(self, map: &Map) -> Result<MapEdits>
Transform permanent edits to MapEdits, looking up the map IDs by the hopefully stabler OSM IDs. Validate that the basemap hasn’t changed in important ways.
sourcepub fn into_edits_permissive(self, map: &Map) -> MapEdits
pub fn into_edits_permissive(self, map: &Map) -> MapEdits
Transform permanent edits to MapEdits, looking up the map IDs by the hopefully stabler OSM IDs. Strip out commands that’re broken, but log warnings.
Trait Implementations
sourceimpl Clone for PermanentMapEdits
impl Clone for PermanentMapEdits
sourcefn clone(&self) -> PermanentMapEdits
fn clone(&self) -> PermanentMapEdits
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more