Struct map_model::PermanentMapEdits[][src]

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: MapNameedits_name: Stringversion: usizecommands: 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

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.

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.

Get the human-friendly of these edits. If they have a descrption, the first line is the title. Otherwise we use the filename.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Deserialize this value from the given Serde deserializer. Read more

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.