Trait lta::blocking::traffic::TrafficRequests
source · pub trait TrafficRequests<C: Client + ClientExt> {
// Required method
fn get_bike_parking(
client: &C,
lat: f64,
long: f64,
dist: impl Into<Option<f64>>
) -> LTAResult<Vec<BikeParking>>;
// Provided methods
fn get_erp_rates(
client: &C,
skip: impl Into<Option<u32>>
) -> LTAResult<Vec<ErpRate>> { ... }
fn get_carpark_avail(
client: &C,
skip: impl Into<Option<u32>>
) -> LTAResult<Vec<CarPark>> { ... }
fn get_est_travel_time(
client: &C,
skip: impl Into<Option<u32>>
) -> LTAResult<Vec<EstTravelTime>> { ... }
fn get_faulty_traffic_lights(
client: &C,
skip: impl Into<Option<u32>>
) -> LTAResult<Vec<FaultyTrafficLight>> { ... }
fn get_road_details(
client: &C,
road_details_type: RoadDetailsType,
skip: impl Into<Option<u32>>
) -> LTAResult<Vec<RoadDetails>> { ... }
fn get_traffic_speed_band(
client: &C,
skip: impl Into<Option<u32>>
) -> LTAResult<Vec<TrafficSpeedBand>> { ... }
fn get_traffic_images(
client: &C,
skip: impl Into<Option<u32>>
) -> LTAResult<Vec<TrafficImage>> { ... }
fn get_traffic_incidents(
client: &C,
skip: impl Into<Option<u32>>
) -> LTAResult<Vec<TrafficIncident>> { ... }
fn get_vms_emas(
client: &C,
skip: impl Into<Option<u32>>
) -> LTAResult<Vec<Vms>> { ... }
fn get_traffic_flow(client: &C) -> LTAResult<Vec<String>> { ... }
}
Required Methods§
Provided Methods§
sourcefn get_erp_rates(
client: &C,
skip: impl Into<Option<u32>>
) -> LTAResult<Vec<ErpRate>>
fn get_erp_rates( client: &C, skip: impl Into<Option<u32>> ) -> LTAResult<Vec<ErpRate>>
Returns ERP rates of all vehicle types across all timings for each zone.
Update freq: Ad-Hoc
sourcefn get_carpark_avail(
client: &C,
skip: impl Into<Option<u32>>
) -> LTAResult<Vec<CarPark>>
fn get_carpark_avail( client: &C, skip: impl Into<Option<u32>> ) -> 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
sourcefn get_est_travel_time(
client: &C,
skip: impl Into<Option<u32>>
) -> LTAResult<Vec<EstTravelTime>>
fn get_est_travel_time( client: &C, skip: impl Into<Option<u32>> ) -> LTAResult<Vec<EstTravelTime>>
Returns estimated travel times of expressways (in segments).
Update freq: 5min
sourcefn get_faulty_traffic_lights(
client: &C,
skip: impl Into<Option<u32>>
) -> LTAResult<Vec<FaultyTrafficLight>>
fn get_faulty_traffic_lights( client: &C, skip: impl Into<Option<u32>> ) -> 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
sourcefn get_road_details(
client: &C,
road_details_type: RoadDetailsType,
skip: impl Into<Option<u32>>
) -> LTAResult<Vec<RoadDetails>>
fn get_road_details( client: &C, road_details_type: RoadDetailsType, skip: impl Into<Option<u32>> ) -> LTAResult<Vec<RoadDetails>>
Returns all planned road openings or road works depending on the RoadDetailsType
supplied
Update freq: 24 hours – whenever there are updates
sourcefn get_traffic_speed_band(
client: &C,
skip: impl Into<Option<u32>>
) -> LTAResult<Vec<TrafficSpeedBand>>
fn get_traffic_speed_band( client: &C, skip: impl Into<Option<u32>> ) -> LTAResult<Vec<TrafficSpeedBand>>
Returns current traffic speeds on expressways and arterial roads, expressed in speed bands.
Update freq: 5 minutes
sourcefn get_traffic_images(
client: &C,
skip: impl Into<Option<u32>>
) -> LTAResult<Vec<TrafficImage>>
fn get_traffic_images( client: &C, skip: impl Into<Option<u32>> ) -> LTAResult<Vec<TrafficImage>>
Returns links to images of live traffic conditions along expressways and Woodlands & Tuas Checkpoints.
Update freq: 1 to 5 minutes
sourcefn get_traffic_incidents(
client: &C,
skip: impl Into<Option<u32>>
) -> LTAResult<Vec<TrafficIncident>>
fn get_traffic_incidents( client: &C, skip: impl Into<Option<u32>> ) -> LTAResult<Vec<TrafficIncident>>
Returns current traffic speeds on expressways and arterial roads, expressed in speed bands.
Update freq: 5 minutes