Struct photon_geocoding::filter::ForwardFilter
source · [−]pub struct ForwardFilter {
pub location_bias: Option<LatLon>,
pub location_bias_zoom: Option<u64>,
pub location_bias_scale: Option<f64>,
pub bounding_box: Option<BoundingBox>,
pub limit: Option<u64>,
pub lang: Option<String>,
pub layer: Option<Vec<PhotonLayer>>,
pub additional_query: Option<Vec<(String, String)>>,
}Expand description
Filtering options for forward searches. This struct implements a builder pattern, so filters can be easily constructed.
Fields
location_bias: Option<LatLon>location_bias_zoom: Option<u64>location_bias_scale: Option<f64>bounding_box: Option<BoundingBox>limit: Option<u64>lang: Option<String>layer: Option<Vec<PhotonLayer>>additional_query: Option<Vec<(String, String)>>Implementations
sourceimpl ForwardFilter
impl ForwardFilter
sourcepub fn new() -> Self
pub fn new() -> Self
Construct a new ForwardFilter. All fields are set to None in the beginning.
sourcepub fn location_bias(
self,
coords: LatLon,
zoom: Option<u64>,
scale: Option<f64>
) -> Self
pub fn location_bias(
self,
coords: LatLon,
zoom: Option<u64>,
scale: Option<f64>
) -> Self
Concentrate the search around a specific coordinate.
zoom describes the radius around the coordinate to focus on.
scale describes how much the prominence of a result should still be taken into account.
See Photon documentation for details
sourcepub fn bounding_box(self, bbox: BoundingBox) -> Self
pub fn bounding_box(self, bbox: BoundingBox) -> Self
Concentrate the search in a specific rectangular area.
sourcepub fn language(self, lang: &str) -> Self
pub fn language(self, lang: &str) -> Self
Return results in a specific language. Photon currently supports DE, EN and FR.
Defaults to the local language of a search result.
sourcepub fn layer(self, layer: Vec<PhotonLayer>) -> Self
pub fn layer(self, layer: Vec<PhotonLayer>) -> Self
Filter results by layer. See Photon documentation
sourcepub fn additional_query(self, query: Vec<(&str, &str)>) -> Self
pub fn additional_query(self, query: Vec<(&str, &str)>) -> Self
Add additional query strings to the request. Example: Filtering by tags and values
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for ForwardFilter
impl Send for ForwardFilter
impl Sync for ForwardFilter
impl Unpin for ForwardFilter
impl UnwindSafe for ForwardFilter
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more