Struct lta::Traffic

source ·
pub struct Traffic;
Expand description

Traffic type that implements APIs. Can be either blocking or async

Trait Implementations§

source§

impl Clone for Traffic

source§

fn clone(&self) -> Traffic

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Traffic

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Ord for Traffic

source§

fn cmp(&self, other: &Traffic) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized + PartialOrd,

Restrict a value to a certain interval. Read more
source§

impl PartialEq for Traffic

source§

fn eq(&self, other: &Traffic) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Traffic

source§

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 · source§

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 · source§

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
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl TrafficRequests<LTAClient<Agent>> for Traffic

source§

fn get_bike_parking( client: &LTAClient<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>>

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>>

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>>

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>>

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>>

Returns all planned road openings or road works depending on the RoadDetailsType supplied Read more
source§

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>>

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>>

Returns current traffic speeds on expressways and arterial roads, expressed in speed bands. Read more
source§

fn get_vms_emas(client: &C, skip: impl Into<Option<u32>>) -> 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. Read more
source§

fn get_traffic_flow(client: &C) -> LTAResult<Vec<String>>

Returns hourly average traffic flow, taken from a representative month of every quarter during 0700-0900 hours. Read more
source§

impl TrafficRequests<LTAClient<Client>> for Traffic

source§

async fn get_bike_parking<D>( client: &LTAClient<ReqwestAsync>, lat: f64, long: f64, dist: D ) -> LTAResult<Vec<BikeParking>>
where D: Into<Option<f64>>,

Returns bicycle parking locations within a radius Read more
source§

async fn get_erp_rates<S>(client: &C, skip: S) -> LTAResult<Vec<ErpRate>>
where S: Into<Option<u32>>,

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>>
where S: Into<Option<u32>>,

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>>
where S: Into<Option<u32>>,

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>>
where S: Into<Option<u32>>,

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>>
where S: Into<Option<u32>>,

Returns all planned road openings or road works depending on the RoadDetailsType supplied Read more
source§

async fn get_traffic_speed_band<S>( client: &C, skip: S ) -> LTAResult<Vec<TrafficSpeedBand>>
where S: Into<Option<u32>>,

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>>
where S: Into<Option<u32>>,

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>>
where S: Into<Option<u32>> + Send,

Returns current traffic speeds on expressways and arterial roads, expressed in speed bands. Read more
source§

async fn get_vms_emas<S>(client: &C, skip: S) -> LTAResult<Vec<Vms>>
where S: Into<Option<u32>>,

Returns traffic advisories (via variable message services) concerning current traffic conditions that are displayed on EMAS signboards along expressways and arterial roads. Read more
source§

async fn get_traffic_flow(client: &C) -> LTAResult<Vec<String>>

Returns hourly average traffic flow, taken from a representative month of every quarter during 0700-0900 hours. Read more
source§

impl TrafficRequests<LTAClient<Client>> for Traffic

source§

fn get_bike_parking( client: &LTAClient<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>>

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>>

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>>

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>>

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>>

Returns all planned road openings or road works depending on the RoadDetailsType supplied Read more
source§

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>>

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>>

Returns current traffic speeds on expressways and arterial roads, expressed in speed bands. Read more
source§

fn get_vms_emas(client: &C, skip: impl Into<Option<u32>>) -> 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. Read more
source§

fn get_traffic_flow(client: &C) -> LTAResult<Vec<String>>

Returns hourly average traffic flow, taken from a representative month of every quarter during 0700-0900 hours. Read more
source§

impl Copy for Traffic

source§

impl Eq for Traffic

source§

impl StructuralEq for Traffic

source§

impl StructuralPartialEq for Traffic

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<Q, K> Comparable<K> for Q
where Q: Ord + ?Sized, K: Borrow<Q> + ?Sized,

§

fn compare(&self, key: &K) -> Ordering

Compare self to key and return their ordering.
§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

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
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

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
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more