Debian Codegraph @

src/api/station_board.rs

raw symbols SCIP
1 use chronorust-analyzer cargo chrono 0.4.42 crate/::DateTimerust-analyzer cargo chrono 0.4.42 datetime/DateTime#;
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#, Legrust-analyzer cargo railway-core 0.3.0 types/Leg#, ProductsSelectionrust-analyzer cargo railway-core 0.3.0 types/ProductsSelection#};
5
6 /// The type of station board (departures, arrivals)
7 pub enum StationBoardKindrust-analyzer cargo railway-core 0.3.0 api/station_board/StationBoardKind# {
8 Departuresrust-analyzer cargo railway-core 0.3.0 api/station_board/StationBoardKind#Departures#,
9 Arrivalsrust-analyzer cargo railway-core 0.3.0 api/station_board/StationBoardKind#Arrivals#,
10 }
11
12 #[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:)]
13 /// The options for [`Provider::station_board`](crate::Provider::station_board)
14 ///
15 /// A provider can also ignore some of the options if this is not supported by the API.
16 pub struct StationBoardOptionsrust-analyzer cargo railway-core 0.3.0 api/station_board/StationBoardOptions# {
17 /// How many results to include.
18 pub resultsrust-analyzer cargo railway-core 0.3.0 api/station_board/StationBoardOptions#results.: u64,
19 /// When should the station board start.
20 pub whenrust-analyzer cargo railway-core 0.3.0 api/station_board/StationBoardOptions#when.: 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#>>,
21 /// How accessible the journey must be.
22 pub accessibilityrust-analyzer cargo railway-core 0.3.0 api/station_board/StationBoardOptions#accessibility.: Accessibilityrust-analyzer cargo railway-core 0.3.0 types/Accessibility#,
23 /// What products to route with.
24 pub productsrust-analyzer cargo railway-core 0.3.0 api/station_board/StationBoardOptions#products.: ProductsSelectionrust-analyzer cargo railway-core 0.3.0 types/ProductsSelection#,
25 /// What language to query with.
26 pub languagerust-analyzer cargo railway-core 0.3.0 api/station_board/StationBoardOptions#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#>,
27 }
28
29 impl Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default# for StationBoardOptionsrust-analyzer cargo railway-core 0.3.0 api/station_board/StationBoardOptions# {
30 fn defaultrust-analyzer cargo railway-core 0.3.0 api/station_board/impl#[StationBoardOptions][Default]default().() -> Selfrust-analyzer cargo railway-core 0.3.0 api/station_board/impl#[StationBoardOptions][Default] {
31 StationBoardOptionsrust-analyzer cargo railway-core 0.3.0 api/station_board/StationBoardOptions# {
32 resultsrust-analyzer cargo railway-core 0.3.0 api/station_board/StationBoardOptions#results.: 5,
33 whenrust-analyzer cargo railway-core 0.3.0 api/station_board/StationBoardOptions#when.: 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().(),
34 accessibilityrust-analyzer cargo railway-core 0.3.0 api/station_board/StationBoardOptions#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().(),
35 productsrust-analyzer cargo railway-core 0.3.0 api/station_board/StationBoardOptions#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().(),
36 languagerust-analyzer cargo railway-core 0.3.0 api/station_board/StationBoardOptions#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().(),
37 }
38 }
39 }
40
41 /// The response for [`Provider::station_board`](crate::Provider::station_board)
42 #[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:)]
43 pub struct StationBoardResponserust-analyzer cargo railway-core 0.3.0 api/station_board/StationBoardResponse# {
44 /// The list of legs which is the result of the request.
45 pub legsrust-analyzer cargo railway-core 0.3.0 api/station_board/StationBoardResponse#legs.: Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<Legrust-analyzer cargo railway-core 0.3.0 types/Leg#>,
46 }