Trait lta::async::traffic::TrafficRequests
source · pub trait TrafficRequests<C: Client + ClientExt> {
// Required method
async fn get_bike_parking<D>(
client: &C,
lat: f64,
long: f64,
dist: D
) -> LTAResult<Vec<BikeParking>>
where D: Into<Option<f64>>;
// Provided methods
async fn get_erp_rates<S>(client: &C, skip: S) -> LTAResult<Vec<ErpRate>>
where S: Into<Option<u32>> { ... }
async fn get_carpark_avail<S>(
client: &C,
skip: S
) -> LTAResult<Vec<CarPark>>
where S: Into<Option<u32>> { ... }
async fn get_est_travel_time<S>(
client: &C,
skip: S
) -> LTAResult<Vec<EstTravelTime>>
where S: Into<Option<u32>> { ... }
async fn get_faulty_traffic_lights<S>(
client: &C,
skip: S
) -> LTAResult<Vec<FaultyTrafficLight>>
where S: Into<Option<u32>> { ... }
async fn get_road_details<S>(
client: &C,
road_details_type: RoadDetailsType,
skip: S
) -> LTAResult<Vec<RoadDetails>>
where S: Into<Option<u32>> { ... }
async fn get_traffic_speed_band<S>(
client: &C,
skip: S
) -> LTAResult<Vec<TrafficSpeedBand>>
where S: Into<Option<u32>> { ... }
async fn get_traffic_images<S>(
client: &C,
skip: S
) -> LTAResult<Vec<TrafficImage>>
where S: Into<Option<u32>> { ... }
async fn get_traffic_incidents<S>(
client: &C,
skip: S
) -> LTAResult<Vec<TrafficIncident>>
where S: Into<Option<u32>> + Send { ... }
async fn get_vms_emas<S>(client: &C, skip: S) -> LTAResult<Vec<Vms>>
where S: Into<Option<u32>> { ... }
async fn get_traffic_flow(client: &C) -> LTAResult<Vec<String>> { ... }
}
Required Methods§
Provided Methods§
sourceasync fn get_erp_rates<S>(client: &C, skip: S) -> LTAResult<Vec<ErpRate>>
async fn get_erp_rates<S>(client: &C, skip: S) -> LTAResult<Vec<ErpRate>>
Returns ERP rates of all vehicle types across all timings for each zone.
Update freq: Ad-Hoc
sourceasync fn get_carpark_avail<S>(client: &C, skip: S) -> LTAResult<Vec<CarPark>>
async fn get_carpark_avail<S>(client: &C, skip: S) -> LTAResult<Vec<CarPark>>
Returns no. of available lots for HDB, LTA and URA carpark data. The LTA carpark data consist of major shopping malls and developments within Orchard, Marina, HarbourFront, Jurong Lake District. (Note: list of LTA carpark data available on this API is subset of those listed on One.Motoring and MyTransport Portals)
Update freq: 1 min
sourceasync fn get_est_travel_time<S>(
client: &C,
skip: S
) -> LTAResult<Vec<EstTravelTime>>
async fn get_est_travel_time<S>( client: &C, skip: S ) -> LTAResult<Vec<EstTravelTime>>
Returns estimated travel times of expressways (in segments).
Update freq: 5min
sourceasync fn get_faulty_traffic_lights<S>(
client: &C,
skip: S
) -> LTAResult<Vec<FaultyTrafficLight>>
async fn get_faulty_traffic_lights<S>( client: &C, skip: S ) -> LTAResult<Vec<FaultyTrafficLight>>
Returns alerts of traffic lights that are currently faulty, or currently undergoing scheduled maintenance.
Update freq: 2min or whenever there are updates
sourceasync fn get_road_details<S>(
client: &C,
road_details_type: RoadDetailsType,
skip: S
) -> LTAResult<Vec<RoadDetails>>
async fn get_road_details<S>( client: &C, road_details_type: RoadDetailsType, skip: S ) -> LTAResult<Vec<RoadDetails>>
Returns all planned road openings or road works depending on the RoadDetailsType
supplied
Update freq: 24 hours – whenever there are updates
sourceasync fn get_traffic_speed_band<S>(
client: &C,
skip: S
) -> LTAResult<Vec<TrafficSpeedBand>>
async fn get_traffic_speed_band<S>( client: &C, skip: S ) -> LTAResult<Vec<TrafficSpeedBand>>
Returns current traffic speeds on expressways and arterial roads, expressed in speed bands.
Update freq: 5 minutes
sourceasync fn get_traffic_images<S>(
client: &C,
skip: S
) -> LTAResult<Vec<TrafficImage>>
async fn get_traffic_images<S>( client: &C, skip: S ) -> LTAResult<Vec<TrafficImage>>
Returns links to images of live traffic conditions along expressways and Woodlands & Tuas Checkpoints.
Update freq: 1 to 5 minutes
sourceasync fn get_traffic_incidents<S>(
client: &C,
skip: S
) -> LTAResult<Vec<TrafficIncident>>
async fn get_traffic_incidents<S>( client: &C, skip: S ) -> LTAResult<Vec<TrafficIncident>>
Returns current traffic speeds on expressways and arterial roads, expressed in speed bands.
Update freq: 5 minutes
sourceasync fn get_vms_emas<S>(client: &C, skip: S) -> LTAResult<Vec<Vms>>
async fn get_vms_emas<S>(client: &C, skip: S) -> LTAResult<Vec<Vms>>
Returns traffic advisories (via variable message services) concerning current traffic conditions that are displayed on EMAS signboards along expressways and arterial roads.
Update freq: 2 minutes