pub struct Traffic;
Expand description
Traffic type that implements APIs. Can be either blocking or async
Trait Implementations§
source§impl Ord for Traffic
impl Ord for Traffic
source§impl PartialEq for Traffic
impl PartialEq for Traffic
source§impl PartialOrd for Traffic
impl PartialOrd for Traffic
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl TrafficRequests<LTAClient<Agent>> for Traffic
impl TrafficRequests<LTAClient<Agent>> for Traffic
source§fn get_bike_parking(
client: <AClient<Agent>,
lat: f64,
long: f64,
dist: impl Into<Option<f64>>
) -> LTAResult<Vec<BikeParking>>
fn get_bike_parking( client: <AClient<Agent>, lat: f64, long: f64, dist: impl Into<Option<f64>> ) -> LTAResult<Vec<BikeParking>>
Returns bicycle parking locations within a radius Read more
source§fn 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. Read more
source§fn 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) Read more
source§fn 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). Read more
source§fn 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. Read more
source§fn 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 Read moresource§fn 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. Read more
source§fn 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. Read more
source§fn 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. Read more
source§impl TrafficRequests<LTAClient<Client>> for Traffic
impl TrafficRequests<LTAClient<Client>> for Traffic
source§async fn get_bike_parking<D>(
client: <AClient<ReqwestAsync>,
lat: f64,
long: f64,
dist: D
) -> LTAResult<Vec<BikeParking>>
async fn get_bike_parking<D>( client: <AClient<ReqwestAsync>, lat: f64, long: f64, dist: D ) -> LTAResult<Vec<BikeParking>>
Returns bicycle parking locations within a radius Read more
source§async 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. Read more
source§async 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) Read more
source§async 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). Read more
source§async 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. Read more
source§async 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 Read moresource§async 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. Read more
source§async 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. Read more
source§async 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. Read more
source§impl TrafficRequests<LTAClient<Client>> for Traffic
impl TrafficRequests<LTAClient<Client>> for Traffic
source§fn get_bike_parking(
client: <AClient<ReqwestBlocking>,
lat: f64,
long: f64,
dist: impl Into<Option<f64>>
) -> LTAResult<Vec<BikeParking>>
fn get_bike_parking( client: <AClient<ReqwestBlocking>, lat: f64, long: f64, dist: impl Into<Option<f64>> ) -> LTAResult<Vec<BikeParking>>
Returns bicycle parking locations within a radius Read more
source§fn 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. Read more
source§fn 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) Read more
source§fn 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). Read more
source§fn 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. Read more
source§fn 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 Read moresource§fn 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. Read more
source§fn 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. Read more
source§fn 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. Read more
impl Copy for Traffic
impl Eq for Traffic
impl StructuralEq for Traffic
impl StructuralPartialEq for Traffic
Auto Trait Implementations§
impl RefUnwindSafe for Traffic
impl Send for Traffic
impl Sync for Traffic
impl Unpin for Traffic
impl UnwindSafe for Traffic
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.