| 1 | use chronorust-analyzer cargo chrono 0.4.42 crate/::{DateTimerust-analyzer cargo chrono 0.4.42 datetime/DateTime#, Durationrust-analyzer cargo chrono 0.4.42 Duration#}; |
| 2 | use chrono_tzrust-analyzer cargo chrono-tz 0.10.4 crate/::Tzrust-analyzer cargo chrono-tz 0.10.4 prebuilt/timezones/Tz#; |
| 3 | |
| 4 | use craterust-analyzer cargo railway-core 0.3.0 crate/::{Accessibilityrust-analyzer cargo railway-core 0.3.0 types/Accessibility#, Agerust-analyzer cargo railway-core 0.3.0 types/Age#, Journeyrust-analyzer cargo railway-core 0.3.0 types/Journey#, LoyaltyCardrust-analyzer cargo railway-core 0.3.0 types/LoyaltyCard#, Placerust-analyzer cargo railway-core 0.3.0 types/Place#, ProductsSelectionrust-analyzer cargo railway-core 0.3.0 types/ProductsSelection#, TariffClassrust-analyzer cargo railway-core 0.3.0 types/TariffClass#}; |
| 5 | |
| 6 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:)] |
| 7 | /// The options for [`Provider::journeys`](crate::Provider::journeys) |
| 8 | /// |
| 9 | /// A provider can also ignore some of the options if this is not supported by the API. |
| 10 | pub struct JourneysOptionsrust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions# { |
| 11 | /// Intermediate place to route with. |
| 12 | pub viarust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#via.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Placerust-analyzer cargo railway-core 0.3.0 types/Place#>, |
| 13 | /// Specify to route earlier than, from [`JourneysResponse::earlier_ref`]. |
| 14 | pub earlier_thanrust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#earlier_than.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 15 | /// Specify to route earlierthan , from [`JourneysResponse::later_ref`]. |
| 16 | pub later_thanrust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#later_than.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 17 | /// How many results to include. |
| 18 | pub resultsrust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#results.: u64, |
| 19 | /// Whether to include stopovers. |
| 20 | pub stopoversrust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#stopovers.: bool, |
| 21 | /// Whether to include polylines. |
| 22 | #[cfg(feature = "polylines")] |
| 23 | pub polylinesrust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#polylines.: bool, |
| 24 | /// Route in a bike-friendly way. |
| 25 | pub bike_friendlyrust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#bike_friendly.: bool, |
| 26 | /// Include tickets. |
| 27 | pub ticketsrust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#tickets.: bool, |
| 28 | /// Allow to walk to the initial station. |
| 29 | pub start_with_walkingrust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#start_with_walking.: bool, |
| 30 | /// How accessible the journey must be. |
| 31 | pub accessibilityrust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#accessibility.: Accessibilityrust-analyzer cargo railway-core 0.3.0 types/Accessibility#, |
| 32 | /// How often it is allowed to transfer. |
| 33 | pub transfersrust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#transfers.: TransferOptionsrust-analyzer cargo railway-core 0.3.0 api/journeys/TransferOptions#, |
| 34 | /// How long must the transfers be. |
| 35 | pub transfer_timerust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#transfer_time.: Durationrust-analyzer cargo chrono 0.4.42 Duration#, |
| 36 | /// When should the journey arrive, or earlier. |
| 37 | pub arrivalrust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#arrival.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<DateTimerust-analyzer cargo chrono 0.4.42 datetime/DateTime#<Tzrust-analyzer cargo chrono-tz 0.10.4 prebuilt/timezones/Tz#>>, |
| 38 | /// When should the journey depart, or later. |
| 39 | pub departurerust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#departure.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<DateTimerust-analyzer cargo chrono 0.4.42 datetime/DateTime#<Tzrust-analyzer cargo chrono-tz 0.10.4 prebuilt/timezones/Tz#>>, |
| 40 | /// What products to route with. |
| 41 | pub productsrust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#products.: ProductsSelectionrust-analyzer cargo railway-core 0.3.0 types/ProductsSelection#, |
| 42 | /// What class to use. |
| 43 | pub tariff_classrust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#tariff_class.: TariffClassrust-analyzer cargo railway-core 0.3.0 types/TariffClass#, |
| 44 | /// What language to query with. |
| 45 | pub languagerust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#language.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 46 | /// What loyalty cards does the passenger have. |
| 47 | pub loyalty_cardrust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#loyalty_card.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<LoyaltyCardrust-analyzer cargo railway-core 0.3.0 types/LoyaltyCard#>, |
| 48 | /// What age does the passenger have. |
| 49 | pub passenger_agerust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#passenger_age.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Agerust-analyzer cargo railway-core 0.3.0 types/Age#>, |
| 50 | } |
| 51 | |
| 52 | /// How often is a journey allowed to transfer. |
| 53 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:)] |
| 54 | pub enum TransferOptionsrust-analyzer cargo railway-core 0.3.0 api/journeys/TransferOptions# { |
| 55 | /// Allow unlimited transfers. |
| 56 | #[defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/default:] |
| 57 | Unlimitedrust-analyzer cargo railway-core 0.3.0 api/journeys/TransferOptions#Unlimited#, |
| 58 | /// Allow transfers only to a limited number. |
| 59 | Limitedrust-analyzer cargo railway-core 0.3.0 api/journeys/TransferOptions#Limited#(u64), |
| 60 | } |
| 61 | |
| 62 | impl Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default# for JourneysOptionsrust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions# { |
| 63 | fn defaultrust-analyzer cargo railway-core 0.3.0 api/journeys/impl#[JourneysOptions][Default]default().() -> Selfrust-analyzer cargo railway-core 0.3.0 api/journeys/impl#[JourneysOptions][Default] { |
| 64 | Selfrust-analyzer cargo railway-core 0.3.0 api/journeys/impl#[JourneysOptions][Default] { |
| 65 | viarust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#via.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/impl#[`Vec<T>`][Default]default().(), |
| 66 | earlier_thanrust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#earlier_than.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][Default]default().(), |
| 67 | later_thanrust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#later_than.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][Default]default().(), |
| 68 | resultsrust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#results.: 5, |
| 69 | stopoversrust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#stopovers.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/impl#[bool][Default]default().(), |
| 70 | #[cfg(feature = "polylines")] |
| 71 | polylinesrust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#polylines.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/impl#[bool][Default]default().(), |
| 72 | bike_friendlyrust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#bike_friendly.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/impl#[bool][Default]default().(), |
| 73 | ticketsrust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#tickets.: true, |
| 74 | start_with_walkingrust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#start_with_walking.: true, |
| 75 | accessibilityrust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#accessibility.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo railway-core 0.3.0 types/impl#[Accessibility][Default]default().(), |
| 76 | transfersrust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#transfers.: TransferOptionsrust-analyzer cargo railway-core 0.3.0 api/journeys/TransferOptions#::defaultrust-analyzer cargo railway-core 0.3.0 api/journeys/impl#[TransferOptions][Default]default().(), |
| 77 | transfer_timerust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#transfer_time.: Durationrust-analyzer cargo chrono 0.4.42 Duration#::zerorust-analyzer cargo chrono 0.4.42 time_delta/impl#[TimeDelta]zero().(), |
| 78 | arrivalrust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#arrival.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][Default]default().(), |
| 79 | departurerust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#departure.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][Default]default().(), |
| 80 | productsrust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#products.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo railway-core 0.3.0 types/impl#[ProductsSelection][Default]default().(), |
| 81 | tariff_classrust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#tariff_class.: TariffClassrust-analyzer cargo railway-core 0.3.0 types/TariffClass#::Secondrust-analyzer cargo railway-core 0.3.0 types/TariffClass#Second#, |
| 82 | languagerust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#language.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][Default]default().(), |
| 83 | loyalty_cardrust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#loyalty_card.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][Default]default().(), |
| 84 | passenger_agerust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysOptions#passenger_age.: Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default#::defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/impl#[`Option<T>`][Default]default().(), |
| 85 | } |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | /// The response for [`Provider::journeys`](crate::Provider::journeys) |
| 90 | #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:)] |
| 91 | pub struct JourneysResponserust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysResponse# { |
| 92 | /// Reference to query earlier, used in [`JourneysOptions::earlier_than`]. |
| 93 | pub earlier_refrust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysResponse#earlier_ref.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 94 | /// Reference to query later, used in [`JourneysOptions::later_than`]. |
| 95 | pub later_refrust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysResponse#later_ref.: Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<Stringrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc string/String#>, |
| 96 | /// The list of journeys which is the result of the request. |
| 97 | pub journeysrust-analyzer cargo railway-core 0.3.0 api/journeys/JourneysResponse#journeys.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Journeyrust-analyzer cargo railway-core 0.3.0 types/Journey#>, |
| 98 | } |