Struct nominatim_rs::client::Client[][src]

pub struct Client {
    pub user_agent: String,
    pub email: Option<String>,
    pub base_url: Url,
    pub client: Client,
}
Expand description

A nominatim client that is binded to the nominatim web api.

Fields

user_agent: String

The user agent of your service. This is required by the Nominatim terms of service.

Note that changing it does nothing unless respecified in the client.

email: Option<String>

Strongly Recommended, your email so Nominatim can contact you in case they dislike your usecase.

base_url: Url

The base URL

client: Client

Implementations

Creates a new client base

User Agent

The user agent of your service. This is required by the Nominatim terms of service.

Email

Strongly Recommended, your email so Nominatim can contact you in case they dislike your usecase.

The lookup API allows to query the address and other details of one or multiple OSM objects like node, way or relation.

Reverse geocoding generates an address from a latitude and longitude.

How it works

The reverse geocoding API does not exactly compute the address for the coordinate it receives. It works by finding the closest suitable OSM object and returning its address information. This may occasionally lead to unexpected results.

First of all, Nominatim only includes OSM objects in its index that are suitable for searching. Small, unnamed paths for example are missing from the database and can therefore not be used for reverse geocoding either.

The other issue to be aware of is that the closest OSM object may not always have a similar enough address to the coordinate you were requesting. For example, in dense city areas it may belong to a completely different street.

The search API allows you to look up a location from a textual description or addrses. Nominatim supports structured and free-form search queries.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

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

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

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

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