pub struct GoogleAttributeProvider { /* private fields */ }Expand description
Implementation of AttributeProvider for Google Roads API speedLimits.
Google’s attribute coverage is limited to speed limits via the Roads API. For richer attribute data (road class, lanes, etc.), use HERE or TomTom.
Implementations§
Source§impl GoogleAttributeProvider
impl GoogleAttributeProvider
pub fn new(client: Arc<GoogleClient>) -> Self
pub fn with_base_url(client: Arc<GoogleClient>, base_url: String) -> Self
Sourcepub async fn get_speed_limits_by_ids(
&self,
place_ids: &[String],
units: Option<&str>,
) -> EveryMapResult<GoogleSpeedLimitsResponse>
pub async fn get_speed_limits_by_ids( &self, place_ids: &[String], units: Option<&str>, ) -> EveryMapResult<GoogleSpeedLimitsResponse>
Get speed limits by place IDs. GET /v1/speedLimits?placeId=…&placeId=…&units=…
Sourcepub async fn get_speed_limits_along_path(
&self,
path: &str,
units: Option<&str>,
) -> EveryMapResult<GoogleSpeedLimitsResponse>
pub async fn get_speed_limits_along_path( &self, path: &str, units: Option<&str>, ) -> EveryMapResult<GoogleSpeedLimitsResponse>
Get speed limits along a path (snapped to roads). GET /v1/speedLimits?path=…&units=…
Trait Implementations§
Source§impl AttributeProvider for GoogleAttributeProvider
impl AttributeProvider for GoogleAttributeProvider
fn get_attributes<'life0, 'life1, 'async_trait>(
&'life0 self,
options: &'life1 AttributeOptions,
) -> Pin<Box<dyn Future<Output = EveryMapResult<AttributeResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§impl GoogleAttributeExt for GoogleAttributeProvider
impl GoogleAttributeExt for GoogleAttributeProvider
Source§fn get_speed_limits_by_ids<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
place_ids: &'life1 [String],
units: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = EveryMapResult<GoogleSpeedLimitsResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_speed_limits_by_ids<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
place_ids: &'life1 [String],
units: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = EveryMapResult<GoogleSpeedLimitsResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get speed limits by place IDs.
GET /v1/speedLimits?placeId=…&placeId=…&units=…
Source§fn get_speed_limits_along_path<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
path: &'life1 str,
units: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = EveryMapResult<GoogleSpeedLimitsResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_speed_limits_along_path<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
path: &'life1 str,
units: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = EveryMapResult<GoogleSpeedLimitsResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Get speed limits along a path (snapped to roads).
GET /v1/speedLimits?path=…&units=…
Auto Trait Implementations§
impl !RefUnwindSafe for GoogleAttributeProvider
impl !UnwindSafe for GoogleAttributeProvider
impl Freeze for GoogleAttributeProvider
impl Send for GoogleAttributeProvider
impl Sync for GoogleAttributeProvider
impl Unpin for GoogleAttributeProvider
impl UnsafeUnpin for GoogleAttributeProvider
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