pub struct Traffic;
Expand description
Traffic type that implements APIs. Can be either blocking or async
Trait Implementations
sourceimpl Ord for Traffic
impl Ord for Traffic
sourceimpl PartialOrd<Traffic> for Traffic
impl PartialOrd<Traffic> for Traffic
sourcefn partial_cmp(&self, other: &Traffic) -> Option<Ordering>
fn partial_cmp(&self, other: &Traffic) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn 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 more
sourceimpl TrafficRequests<LTAClient> for Traffic
impl TrafficRequests<LTAClient> for Traffic
sourcefn get_erp_rates<'life0, 'async_trait, S>(
client: &'life0 LTAClient,
skip: S
) -> Pin<Box<dyn Future<Output = LTAResult<Vec<ErpRate>>> + Send + 'async_trait>> where
S: Into<Option<u32>> + Send,
S: 'async_trait,
'life0: 'async_trait,
fn get_erp_rates<'life0, 'async_trait, S>(
client: &'life0 LTAClient,
skip: S
) -> Pin<Box<dyn Future<Output = LTAResult<Vec<ErpRate>>> + Send + 'async_trait>> where
S: Into<Option<u32>> + Send,
S: 'async_trait,
'life0: 'async_trait,
Returns ERP rates of all vehicle types across all timings for each zone. Read more
sourcefn get_carpark_avail<'life0, 'async_trait, S>(
client: &'life0 LTAClient,
skip: S
) -> Pin<Box<dyn Future<Output = LTAResult<Vec<CarPark>>> + Send + 'async_trait>> where
S: Into<Option<u32>> + Send,
S: 'async_trait,
'life0: 'async_trait,
fn get_carpark_avail<'life0, 'async_trait, S>(
client: &'life0 LTAClient,
skip: S
) -> Pin<Box<dyn Future<Output = LTAResult<Vec<CarPark>>> + Send + 'async_trait>> where
S: Into<Option<u32>> + Send,
S: 'async_trait,
'life0: 'async_trait,
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
sourcefn get_est_travel_time<'life0, 'async_trait, S>(
client: &'life0 LTAClient,
skip: S
) -> Pin<Box<dyn Future<Output = LTAResult<Vec<EstTravelTime>>> + Send + 'async_trait>> where
S: Into<Option<u32>> + Send,
S: 'async_trait,
'life0: 'async_trait,
fn get_est_travel_time<'life0, 'async_trait, S>(
client: &'life0 LTAClient,
skip: S
) -> Pin<Box<dyn Future<Output = LTAResult<Vec<EstTravelTime>>> + Send + 'async_trait>> where
S: Into<Option<u32>> + Send,
S: 'async_trait,
'life0: 'async_trait,
Returns estimated travel times of expressways (in segments). Read more
sourcefn get_faulty_traffic_lights<'life0, 'async_trait, S>(
client: &'life0 LTAClient,
skip: S
) -> Pin<Box<dyn Future<Output = LTAResult<Vec<FaultyTrafficLight>>> + Send + 'async_trait>> where
S: Into<Option<u32>> + Send,
S: 'async_trait,
'life0: 'async_trait,
fn get_faulty_traffic_lights<'life0, 'async_trait, S>(
client: &'life0 LTAClient,
skip: S
) -> Pin<Box<dyn Future<Output = LTAResult<Vec<FaultyTrafficLight>>> + Send + 'async_trait>> where
S: Into<Option<u32>> + Send,
S: 'async_trait,
'life0: 'async_trait,
Returns alerts of traffic lights that are currently faulty, or currently undergoing scheduled maintenance. Read more
sourcefn get_road_details<'life0, 'async_trait, S>(
client: &'life0 LTAClient,
road_details_type: RoadDetailsType,
skip: S
) -> Pin<Box<dyn Future<Output = LTAResult<Vec<RoadDetails>>> + Send + 'async_trait>> where
S: Into<Option<u32>> + Send,
S: 'async_trait,
'life0: 'async_trait,
fn get_road_details<'life0, 'async_trait, S>(
client: &'life0 LTAClient,
road_details_type: RoadDetailsType,
skip: S
) -> Pin<Box<dyn Future<Output = LTAResult<Vec<RoadDetails>>> + Send + 'async_trait>> where
S: Into<Option<u32>> + Send,
S: 'async_trait,
'life0: 'async_trait,
Returns all planned road openings or road works depending on the RoadDetailsType
supplied Read more
sourcefn get_traffic_speed_band<'life0, 'async_trait, S>(
client: &'life0 LTAClient,
skip: S
) -> Pin<Box<dyn Future<Output = LTAResult<Vec<TrafficSpeedBand>>> + Send + 'async_trait>> where
S: Into<Option<u32>> + Send,
S: 'async_trait,
'life0: 'async_trait,
fn get_traffic_speed_band<'life0, 'async_trait, S>(
client: &'life0 LTAClient,
skip: S
) -> Pin<Box<dyn Future<Output = LTAResult<Vec<TrafficSpeedBand>>> + Send + 'async_trait>> where
S: Into<Option<u32>> + Send,
S: 'async_trait,
'life0: 'async_trait,
Returns current traffic speeds on expressways and arterial roads, expressed in speed bands. Read more
sourcefn get_traffic_images<'life0, 'async_trait, S>(
client: &'life0 LTAClient,
skip: S
) -> Pin<Box<dyn Future<Output = LTAResult<Vec<TrafficImage>>> + Send + 'async_trait>> where
S: Into<Option<u32>> + Send,
S: 'async_trait,
'life0: 'async_trait,
fn get_traffic_images<'life0, 'async_trait, S>(
client: &'life0 LTAClient,
skip: S
) -> Pin<Box<dyn Future<Output = LTAResult<Vec<TrafficImage>>> + Send + 'async_trait>> where
S: Into<Option<u32>> + Send,
S: 'async_trait,
'life0: 'async_trait,
Returns links to images of live traffic conditions along expressways and Woodlands & Tuas Checkpoints. Read more
sourcefn get_traffic_incidents<'life0, 'async_trait, S>(
client: &'life0 LTAClient,
skip: S
) -> Pin<Box<dyn Future<Output = LTAResult<Vec<TrafficIncident>>> + Send + 'async_trait>> where
S: Into<Option<u32>> + Send,
S: 'async_trait,
'life0: 'async_trait,
fn get_traffic_incidents<'life0, 'async_trait, S>(
client: &'life0 LTAClient,
skip: S
) -> Pin<Box<dyn Future<Output = LTAResult<Vec<TrafficIncident>>> + Send + 'async_trait>> where
S: Into<Option<u32>> + Send,
S: 'async_trait,
'life0: 'async_trait,
Returns current traffic speeds on expressways and arterial roads, expressed in speed bands. Read more
sourcefn get_vms_emas<'life0, 'async_trait, S>(
client: &'life0 LTAClient,
skip: S
) -> Pin<Box<dyn Future<Output = LTAResult<Vec<Vms>>> + Send + 'async_trait>> where
S: Into<Option<u32>> + Send,
S: 'async_trait,
'life0: 'async_trait,
fn get_vms_emas<'life0, 'async_trait, S>(
client: &'life0 LTAClient,
skip: S
) -> Pin<Box<dyn Future<Output = LTAResult<Vec<Vms>>> + Send + 'async_trait>> where
S: Into<Option<u32>> + Send,
S: 'async_trait,
'life0: 'async_trait,
Returns traffic advisories (via variable message services) concerning current traffic conditions that are displayed on EMAS signboards along expressways and arterial roads. Read more
sourcefn get_bike_parking<'life0, 'async_trait, D>(
client: &'life0 LTAClient,
lat: f64,
long: f64,
dist: D
) -> Pin<Box<dyn Future<Output = LTAResult<Vec<BikeParking>>> + Send + 'async_trait>> where
D: Into<Option<f64>> + Send,
D: 'async_trait,
'life0: 'async_trait,
fn get_bike_parking<'life0, 'async_trait, D>(
client: &'life0 LTAClient,
lat: f64,
long: f64,
dist: D
) -> Pin<Box<dyn Future<Output = LTAResult<Vec<BikeParking>>> + Send + 'async_trait>> where
D: Into<Option<f64>> + Send,
D: 'async_trait,
'life0: 'async_trait,
Returns bicycle parking locations within a radius 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more