pub struct NominatimClient { /* private fields */ }Expand description
Client for Nominatim (OpenStreetMap Geocoding)
Provides access to:
- Address to coordinates (geocoding)
- Coordinates to address (reverse geocoding)
- Place name search
IMPORTANT: STRICT rate limit of 1 request/second is enforced. See: https://operations.osmfoundation.org/policies/nominatim/
§Example
ⓘ
use ruvector_data_framework::NominatimClient;
let client = NominatimClient::new()?;
let coords = client.geocode("1600 Pennsylvania Avenue, Washington DC").await?;
let address = client.reverse_geocode(38.8977, -77.0365).await?;
let places = client.search("Eiffel Tower", 5).await?;Implementations§
Source§impl NominatimClient
impl NominatimClient
Sourcepub async fn reverse_geocode(
&self,
lat: f64,
lon: f64,
) -> Result<Vec<SemanticVector>>
pub async fn reverse_geocode( &self, lat: f64, lon: f64, ) -> Result<Vec<SemanticVector>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NominatimClient
impl !RefUnwindSafe for NominatimClient
impl Send for NominatimClient
impl Sync for NominatimClient
impl Unpin for NominatimClient
impl !UnwindSafe for NominatimClient
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more