Struct map_model::City[][src]

pub struct City {
    pub name: CityName,
    pub boundary: Polygon,
    pub areas: Vec<(AreaType, Polygon)>,
    pub districts: Vec<(MapName, Polygon)>,
}
Expand description

A single city (like Seattle) can be broken down into multiple boundary polygons (udistrict, ballard, downtown, etc). The load map screen uses this struct to display the entire city.

Fields

name: CityNameboundary: Polygonareas: Vec<(AreaType, Polygon)>districts: Vec<(MapName, Polygon)>

The individual maps

Implementations

If there’s a single map covering all the smaller maps, use this.

Generate a city from a bunch of smaller, individual maps. The boundaries of those maps may overlap and may have gaps between them.

Trait Implementations

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 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.