[][src]Struct transit_model::model::Collections

pub struct Collections {
    pub contributors: CollectionWithId<Contributor>,
    pub datasets: CollectionWithId<Dataset>,
    pub networks: CollectionWithId<Network>,
    pub commercial_modes: CollectionWithId<CommercialMode>,
    pub lines: CollectionWithId<Line>,
    pub routes: CollectionWithId<Route>,
    pub vehicle_journeys: CollectionWithId<VehicleJourney>,
    pub physical_modes: CollectionWithId<PhysicalMode>,
    pub stop_areas: CollectionWithId<StopArea>,
    pub stop_points: CollectionWithId<StopPoint>,
    pub feed_infos: BTreeMap<String, String>,
    pub calendars: CollectionWithId<Calendar>,
    pub companies: CollectionWithId<Company>,
    pub comments: CollectionWithId<Comment>,
    pub equipments: CollectionWithId<Equipment>,
    pub transfers: Collection<Transfer>,
    pub trip_properties: CollectionWithId<TripProperty>,
    pub geometries: CollectionWithId<Geometry>,
    pub tickets: Collection<Ticket>,
    pub od_rules: Collection<ODRule>,
    pub admin_stations: Collection<AdminStation>,
    pub stop_time_headsigns: HashMap<(Idx<VehicleJourney>, u32), String>,
    pub stop_time_ids: HashMap<(Idx<VehicleJourney>, u32), String>,
    pub stop_time_comments: HashMap<(Idx<VehicleJourney>, u32), Idx<Comment>>,
}

The set of collections representing the model.

Fields

contributors: CollectionWithId<Contributor>datasets: CollectionWithId<Dataset>networks: CollectionWithId<Network>commercial_modes: CollectionWithId<CommercialMode>lines: CollectionWithId<Line>routes: CollectionWithId<Route>vehicle_journeys: CollectionWithId<VehicleJourney>physical_modes: CollectionWithId<PhysicalMode>stop_areas: CollectionWithId<StopArea>stop_points: CollectionWithId<StopPoint>feed_infos: BTreeMap<String, String>calendars: CollectionWithId<Calendar>companies: CollectionWithId<Company>comments: CollectionWithId<Comment>equipments: CollectionWithId<Equipment>transfers: Collection<Transfer>trip_properties: CollectionWithId<TripProperty>geometries: CollectionWithId<Geometry>tickets: Collection<Ticket>od_rules: Collection<ODRule>admin_stations: Collection<AdminStation>stop_time_headsigns: HashMap<(Idx<VehicleJourney>, u32), String>stop_time_ids: HashMap<(Idx<VehicleJourney>, u32), String>stop_time_comments: HashMap<(Idx<VehicleJourney>, u32), Idx<Comment>>

Methods

impl Collections[src]

pub fn try_merge(&mut self, c: Collections) -> Result<()>[src]

Merge the Collections parameter into the current Collections by consecutively merging each collections representing the model. Fails in case of id collision.

pub fn restrict_period(
    &mut self,
    start_date: &NaiveDate,
    end_date: &NaiveDate
) -> Result<()>
[src]

Restrict the validity period of the current Collections with the start_date and end_date

pub fn sanitize(&mut self) -> Result<()>[src]

Keep the collections consistent for the new model by purging unreferenced data by calendars

Trait Implementations

impl Default for Collections[src]

impl Debug for Collections[src]

impl<'de> Deserialize<'de> for Collections[src]

impl Serialize for Collections[src]

Auto Trait Implementations

impl Send for Collections

impl Sync for Collections

Blanket Implementations

impl<T> From for T[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]