pub struct FindPlace<'a> { /* private fields */ }Implementations§
Source§impl<'a> FindPlace<'a>
impl<'a> FindPlace<'a>
Sourcepub fn with_input(&mut self, input: &str) -> &mut FindPlace<'a>
pub fn with_input(&mut self, input: &str) -> &mut FindPlace<'a>
Assign the input string for a FindPlace call.
input -> The input text.
Sourcepub fn with_fields(
&mut self,
fields: HashSet<PlaceSearchPlaceFields>,
) -> &mut FindPlace<'a>
pub fn with_fields( &mut self, fields: HashSet<PlaceSearchPlaceFields>, ) -> &mut FindPlace<'a>
Assign the fields for a FindPlace call.
fields -> The fields parameter.
Sourcepub fn with_language(&mut self, language: Language) -> &mut FindPlace<'a>
pub fn with_language(&mut self, language: Language) -> &mut FindPlace<'a>
Assign the language for a FindPlace call.
language -> The language parameter.
Sourcepub fn with_location_bias(
&mut self,
location_bias: LocationBias,
) -> &mut FindPlace<'a>
pub fn with_location_bias( &mut self, location_bias: LocationBias, ) -> &mut FindPlace<'a>
Assign the location_bias for a FindPlace call.
location_bias -> The location_bias parameter.
Sourcepub fn with_input_type(&mut self, input_type: &str) -> &mut FindPlace<'a>
pub fn with_input_type(&mut self, input_type: &str) -> &mut FindPlace<'a>
Assign the input_type for a FindPlace call.
input_type -> The input_type parameter.
Sourcepub async fn execute(&mut self) -> Option<&mut FindPlace<'a>>
pub async fn execute(&mut self) -> Option<&mut FindPlace<'a>>
Execute the call in an asynchronous fashion.
Sourcepub fn iter(&mut self) -> FindPlaceIterator<'_, 'a> ⓘ
pub fn iter(&mut self) -> FindPlaceIterator<'_, 'a> ⓘ
This function returns an iterator (FindPlaceIterator) over the places in a FindPlace object. The iterator is initialized to start at the first place (index 0).
It allows you to iterate over the places in the FindPlace result without having to manually keep track of the index.
For example, you can use it like this:
Sourcepub fn at(&self, index: usize) -> Option<&PlaceSearchPlace>
pub fn at(&self, index: usize) -> Option<&PlaceSearchPlace>
Retrieve the place at the specified index.
index -> The index of the place to retrieve.
Returns an Option with the place if it exists, or None if the index is out of range.