pub struct SearchQuery {
    pub location_query: LocationQuery,
    pub address_details: bool,
    pub extra_tags: bool,
    pub name_details: bool,
    pub accept_language: Option<Vec<String>>,
    pub country_codes: Option<Vec<String>>,
    pub exclude_place_ids: Option<Vec<u64>>,
    pub limit: Option<u8>,
    pub viewbox: Option<[f64; 4]>,
    pub dedupe: bool,
}

Fields§

§location_query: LocationQuery§address_details: bool

Include a breakdown of the address into elements

§extra_tags: bool

Include additional information if the result is available

§name_details: bool

Include a list of alternative names in the results. This may include language variants, references, operator and brand.

§accept_language: Option<Vec<String>>

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.

§country_codes: Option<Vec<String>>

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.

§exclude_place_ids: Option<Vec<u64>>

If you do not want certain OSM objects to appear in the search result, give a comma separated list of the place_ids 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.)

§limit: Option<u8>

Limits the number of returned results. (Default: 10, Maximum: 50.)

§viewbox: Option<[f64; 4]>

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>
§dedupe: bool

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

Trait Implementations§

source§

impl Clone for SearchQuery

source§

fn clone(&self) -> SearchQuery

Returns a copy 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 SearchQuery

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Serialize for SearchQuery

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
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 Twhere 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 Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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