Struct navitia_poi_model::objects::Model[][src]

pub struct Model {
    pub pois: BTreeMap<String, Poi>,
    pub poi_types: HashMap<String, PoiType>,
}
Expand description

A data structure used for exporting and importing data to and from file.

Fields

pois: BTreeMap<String, Poi>

A list of POIs.

Could have been a hashmap…

poi_types: HashMap<String, PoiType>

A map of PoiType, indexed by their id.

We use a hashmap to list poi types, as the main purpose is to search for a PoiType based on its id. (Poi only stores the type’s id)

Implementations

Creates a new model based on data found in path.

Saves the model to file.

Tries to merge a Model into another.

Trait Implementations

Formats the value using the given formatter. Read more

Returns the “default value” for a type. 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.

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.