Struct nominatim_rs::search::SearchQueryBuilder
source · pub struct SearchQueryBuilder { /* private fields */ }
Expand description
Builder for SearchQuery
.
Implementations§
source§impl SearchQueryBuilder
impl SearchQueryBuilder
pub fn location_query(&mut self, value: LocationQuery) -> &mut Self
sourcepub fn address_details(&mut self, value: bool) -> &mut Self
pub fn address_details(&mut self, value: bool) -> &mut Self
Include a breakdown of the address into elements
Include additional information if the result is available
sourcepub fn name_details(&mut self, value: bool) -> &mut Self
pub fn name_details(&mut self, value: bool) -> &mut Self
Include a list of alternative names in the results. This may include language variants, references, operator and brand.
sourcepub fn accept_language(&mut self, value: Option<Vec<String>>) -> &mut Self
pub fn accept_language(&mut self, value: Option<Vec<String>>) -> &mut Self
Preferred language order for showing search results, overrides the value specified in the “Accept-Languague” HTTP header. Either use a standard RFC2616 accept-language string or a simple comma-separated list of language codes.
sourcepub fn country_codes(&mut self, value: Option<Vec<String>>) -> &mut Self
pub fn country_codes(&mut self, value: Option<Vec<String>>) -> &mut Self
Include addition information if the result is available
Limit search results to one of more countries. The country code must
be the
ISO-3166-1alpha2
code, e.g. gb
for the United Kingdom, de
for Germany.
Each place in Nominatim is assigned to one country code based of OSM country borders. In rare cases a place may not be in any country at all, for example, in international waters.
sourcepub fn exclude_place_ids(&mut self, value: Option<Vec<u64>>) -> &mut Self
pub fn exclude_place_ids(&mut self, value: Option<Vec<u64>>) -> &mut Self
If you do not want certain OSM objects to appear in the search
result, give a comma separated list of the place_id
s you want to
skip. This can be used to retrieve additional search results.
For example, if a previous query only returned a few results, then
including those here would cause the search to return other, less
accurate, matches (if possible.)
sourcepub fn limit(&mut self, value: Option<u8>) -> &mut Self
pub fn limit(&mut self, value: Option<u8>) -> &mut Self
Limits the number of returned results. (Default: 10, Maximum: 50.)
sourcepub fn viewbox(&mut self, value: Option<[f64; 4]>) -> &mut Self
pub fn viewbox(&mut self, value: Option<[f64; 4]>) -> &mut Self
The preferred area to find search results. Any two corner points of the box are accepted as long as they span a real box.
viewbox=<x1>,<y1>,<x2>,<y2>
sourcepub fn dedupe(&mut self, value: bool) -> &mut Self
pub fn dedupe(&mut self, value: bool) -> &mut Self
Sometimes you have several objects in OSM identifying the same place
or object in reality. The simplest case is a street being split into
many different OSM ways due to different characteristics. Nominatim
will attempt to detect such duplicates and only return on match
unless this parameter is set to false
. (Default: true
),
sourcepub fn build(&self) -> Result<SearchQuery, SearchQueryBuilderError>
pub fn build(&self) -> Result<SearchQuery, SearchQueryBuilderError>
Trait Implementations§
source§impl Clone for SearchQueryBuilder
impl Clone for SearchQueryBuilder
source§fn clone(&self) -> SearchQueryBuilder
fn clone(&self) -> SearchQueryBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more