pub struct ReverseFilter {
pub radius: Option<u64>,
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 reverse searches. This struct implements a builder pattern, so filters can be easily constructed.
Fields§
§radius: Option<u64>§limit: Option<u64>§lang: Option<String>§layer: Option<Vec<PhotonLayer>>§additional_query: Option<Vec<(String, String)>>Implementations§
Source§impl ReverseFilter
impl ReverseFilter
Sourcepub fn new() -> Self
pub fn new() -> Self
Construct a new ReverseFilter. All fields are set to None in the beginning.
pub fn radius(self, radius: u64) -> Self
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 Freeze for ReverseFilter
impl RefUnwindSafe for ReverseFilter
impl Send for ReverseFilter
impl Sync for ReverseFilter
impl Unpin for ReverseFilter
impl UnwindSafe for ReverseFilter
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