Traffic

Struct 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 duplicate 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,

Restrict a value to a certain interval. Read more
Sourceยง

impl PartialEq for Traffic

Sourceยง

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 ยท Sourceยง

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

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

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

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

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Sourceยง

impl TrafficRequests<LTAClient> for Traffic

Sourceยง

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 + 'async_trait, 'life0: 'async_trait,

Returns ERP rates of all vehicle types across all timings for each zone. Read more
Sourceยง

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 + '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
Sourceยง

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 + 'async_trait, 'life0: 'async_trait,

Returns estimated travel times of expressways (in segments). Read more
Sourceยง

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 + 'async_trait, 'life0: 'async_trait,

Returns alerts of traffic lights that are currently faulty, or currently undergoing scheduled maintenance. Read more
Sourceยง

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 + 'async_trait, 'life0: 'async_trait,

Returns all planned road openings or road works depending on the RoadDetailsType supplied Read more
Sourceยง

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 + 'async_trait, 'life0: 'async_trait,

Returns current traffic speeds on expressways and arterial roads, expressed in speed bands. Read more
Sourceยง

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 + 'async_trait, 'life0: 'async_trait,

Returns links to images of live traffic conditions along expressways and Woodlands & Tuas Checkpoints. Read more
Sourceยง

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 + 'async_trait, 'life0: 'async_trait,

Returns current traffic speeds on expressways and arterial roads, expressed in speed bands. Read more
Sourceยง

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 + '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
Sourceยง

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 + 'async_trait, 'life0: 'async_trait,

Returns bicycle parking locations within a radius Read more
Sourceยง

impl Copy for Traffic

Sourceยง

impl Eq 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
Sourceยง

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

Sourceยง

unsafe fn clone_to_uninit(&self, dest: *mut u8)

๐Ÿ”ฌThis is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Sourceยง

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

Sourceยง

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

Compare self to key and return their ordering.
Sourceยง

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

Sourceยง

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

Checks if this value is equivalent to the given key. Read more
Sourceยง

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

Sourceยง

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.

Sourceยง

impl<T> Instrument for T

Sourceยง

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

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Sourceยง

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,

Sourceยง

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

Sourceยง

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

Sourceยง

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.
Sourceยง

impl<T> WithSubscriber for T

Sourceยง

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
Sourceยง

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Sourceยง

impl<T> ErasedDestructor for T
where T: 'static,