pub struct GeocodingBuilder<'a> { /* private fields */ }Expand description
Builder for the /v1/search geocoding endpoint.
Implementations§
Source§impl<'a> GeocodingBuilder<'a>
impl<'a> GeocodingBuilder<'a>
Sourcepub fn count(self, count: u8) -> Self
pub fn count(self, count: u8) -> Self
Limits the number of returned matches.
Open-Meteo accepts values from 1 to 100. If called repeatedly, the most recent value wins.
Sourcepub fn language(self, language: impl Into<String>) -> Self
pub fn language(self, language: impl Into<String>) -> Self
Sets the two-letter result language code, such as en or de.
The code must be lowercase ASCII. If called repeatedly, the most recent value wins.
Sourcepub fn country_code(self, country_code: impl Into<String>) -> Self
pub fn country_code(self, country_code: impl Into<String>) -> Self
Restricts results to an ISO 3166-1 alpha-2 country code, such as CH.
The value is normalized to uppercase ASCII. If called repeatedly, the most recent value wins.
Sourcepub async fn send(self) -> Result<Vec<GeocodedLocation>>
pub async fn send(self) -> Result<Vec<GeocodedLocation>>
Sends the request and decodes matching locations.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for GeocodingBuilder<'a>
impl<'a> !RefUnwindSafe for GeocodingBuilder<'a>
impl<'a> Send for GeocodingBuilder<'a>
impl<'a> Sync for GeocodingBuilder<'a>
impl<'a> Unpin for GeocodingBuilder<'a>
impl<'a> UnsafeUnpin for GeocodingBuilder<'a>
impl<'a> !UnwindSafe for GeocodingBuilder<'a>
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