[][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 frequencies: Collection<Frequency>,
    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 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>>,
    pub prices_v1: Collection<PriceV1>,
    pub od_fares_v1: Collection<ODFareV1>,
    pub fares_v1: Collection<FareV1>,
    pub tickets: CollectionWithId<Ticket>,
    pub ticket_uses: CollectionWithId<TicketUse>,
    pub ticket_prices: Collection<TicketPrice>,
    pub ticket_use_perimeters: Collection<TicketUsePerimeter>,
    pub ticket_use_restrictions: Collection<TicketUseRestriction>,
}

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>frequencies: Collection<Frequency>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>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>>prices_v1: Collection<PriceV1>od_fares_v1: Collection<ODFareV1>fares_v1: Collection<FareV1>tickets: CollectionWithId<Ticket>ticket_uses: CollectionWithId<TicketUse>ticket_prices: Collection<TicketPrice>ticket_use_perimeters: Collection<TicketUsePerimeter>ticket_use_restrictions: Collection<TicketUseRestriction>

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

Blanket Implementations

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

impl<T> From<T> for T[src]

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

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> 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> Borrow<T> for T where
    T: ?Sized
[src]

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

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

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

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,