pub struct FilterSetBuilder<'a>(pub FilterSet<'a>);Expand description
A convenient builder API for FilterSet.
Tuple Fields§
§0: FilterSet<'a>The set being configured.
Implementations§
Source§impl<'a> FilterSetBuilder<'a>
impl<'a> FilterSetBuilder<'a>
Sourcepub fn with_id(self, id: i64) -> Self
pub fn with_id(self, id: i64) -> Self
Restrict this set to only elements with the given identifier. See FilterSet::id_filters.
Sourcepub fn with_ids(self, ids: impl IntoIterator<Item = i64>) -> Self
pub fn with_ids(self, ids: impl IntoIterator<Item = i64>) -> Self
Restrict this set to only elements with the given identifiers. See FilterSet::id_filters.
Sourcepub fn within_bounds(self, bbox: impl Into<Bbox>) -> Self
pub fn within_bounds(self, bbox: impl Into<Bbox>) -> Self
Restrict this set to only elements contained by the given bounding box. See FilterSet::bbox_filter.
Sourcepub fn with_tag(self, tag: &'a str) -> Self
pub fn with_tag(self, tag: &'a str) -> Self
Restrict this set to only elements that have a tag of the given name. See TagFilter::Exists.
Sourcepub fn without_tag(self, tag: &'a str) -> Self
pub fn without_tag(self, tag: &'a str) -> Self
Restrict this set to only elements that do not have a tag of the given name. See TagFilter::NotExists.
Sourcepub fn with_tag_value(self, tag: &'a str, value: &'a str) -> Self
pub fn with_tag_value(self, tag: &'a str, value: &'a str) -> Self
Restrict this set to only elements that have the given tag with the given value. See TagFilter::Equals.
Sourcepub fn without_tag_value(self, tag: &'a str, value: &'a str) -> Self
pub fn without_tag_value(self, tag: &'a str, value: &'a str) -> Self
Restrict this set to only elements that do not have the given tag, or have a value different from the given value. See TagFilter::NotEquals.
Sourcepub fn with_tag_value_matching(self, tag: &'a str, value_pat: &'a str) -> Self
pub fn with_tag_value_matching(self, tag: &'a str, value_pat: &'a str) -> Self
Restrict this set to only elements that have the given tag with a value that matches the given regular expression. See TagFilter::Matches.
Sourcepub fn without_tag_value_matching(
self,
tag: &'a str,
value_pat: &'a str,
) -> Self
pub fn without_tag_value_matching( self, tag: &'a str, value_pat: &'a str, ) -> Self
Restrict this set to only elements that do not have the given tag, or have a value that does not match the given regular expression. See TagFilter::NotMatches.
Sourcepub fn with_tag_name_and_value_matching(
self,
tag_pat: &'a str,
value_pat: &'a str,
) -> Self
pub fn with_tag_name_and_value_matching( self, tag_pat: &'a str, value_pat: &'a str, ) -> Self
Restrict this set to only elements that have a tag matching the given regular expression, with a value that matches the given regular expression. See TagFilter::NameValueMatches.
Restrict this set to only elements that have tags of the given names. See TagFilter::Exists.
Restrict this set to only elements that do not have tags of the given names. See TagFilter::NotExists.
Sourcepub fn with_tag_values(
self,
tags: impl IntoIterator<Item = (&'a str, &'a str)>,
) -> Self
pub fn with_tag_values( self, tags: impl IntoIterator<Item = (&'a str, &'a str)>, ) -> Self
Restrict this set to only elements that have the given tags with the given values. See TagFilter::Equals.
Sourcepub fn without_tag_values(
self,
tags: impl IntoIterator<Item = (&'a str, &'a str)>,
) -> Self
pub fn without_tag_values( self, tags: impl IntoIterator<Item = (&'a str, &'a str)>, ) -> Self
Restrict this set to only elements that do not have the given tags, or have values different from the given values. See TagFilter::NotEquals.
Sourcepub fn with_tag_values_matching(
self,
tags: impl IntoIterator<Item = (&'a str, &'a str)>,
) -> Self
pub fn with_tag_values_matching( self, tags: impl IntoIterator<Item = (&'a str, &'a str)>, ) -> Self
Restrict this set to only elements that have the given tags with values that matches the given regular expressions. See TagFilter::Matches.
Sourcepub fn without_tag_values_matching(
self,
tags: impl IntoIterator<Item = (&'a str, &'a str)>,
) -> Self
pub fn without_tag_values_matching( self, tags: impl IntoIterator<Item = (&'a str, &'a str)>, ) -> Self
Restrict this set to only elements that do not have the given tags, or have values that does not match the given regular expressions. See TagFilter::NotMatches.
Sourcepub fn with_tag_names_and_values_matching(
self,
tags: impl IntoIterator<Item = (&'a str, &'a str)>,
) -> Self
pub fn with_tag_names_and_values_matching( self, tags: impl IntoIterator<Item = (&'a str, &'a str)>, ) -> Self
Restrict this set to only elements that have tags matching the given regular expressions, with values that matches the given regular expressions. See TagFilter::NameValueMatches.
Sourcepub fn within_ways(self, set: impl Into<Cow<'a, Set<'a>>>) -> Self
pub fn within_ways(self, set: impl Into<Cow<'a, Set<'a>>>) -> Self
Restrict this set to only Nodes that are members of a Way in the given set. See RecurseFilter::WithinWays.
Sourcepub fn within_relations(self, set: impl Into<Cow<'a, Set<'a>>>) -> Self
pub fn within_relations(self, set: impl Into<Cow<'a, Set<'a>>>) -> Self
Restrict this set to only elements that are members of a Relation in the given set. See RecurseFilter::WithinRelations.
Sourcepub fn within_relations_with_role(
self,
role: &'a str,
set: impl Into<Cow<'a, Set<'a>>>,
) -> Self
pub fn within_relations_with_role( self, role: &'a str, set: impl Into<Cow<'a, Set<'a>>>, ) -> Self
Restrict this set to only elements that are members of a Relation in the given set, and that membership has the given role. See RecurseFilter::WithinRelations.
Sourcepub fn containing_nodes(self, set: impl Into<Cow<'a, Set<'a>>>) -> Self
pub fn containing_nodes(self, set: impl Into<Cow<'a, Set<'a>>>) -> Self
Restrict this set to only elements that have a Node in this set as a member. See RecurseFilter::ContainingNodes.
Sourcepub fn containing_nodes_with_role(
self,
role: &'a str,
set: impl Into<Cow<'a, Set<'a>>>,
) -> Self
pub fn containing_nodes_with_role( self, role: &'a str, set: impl Into<Cow<'a, Set<'a>>>, ) -> Self
Restrict this set to only elements that have a Node in this set as a member, and that membership has the given role. See RecurseFilter::ContainingNodes.
Sourcepub fn containing_ways(self, set: impl Into<Cow<'a, Set<'a>>>) -> Self
pub fn containing_ways(self, set: impl Into<Cow<'a, Set<'a>>>) -> Self
Restrict this set to only elements that have a Way in this set as a member. See RecurseFilter::ContainingWays.
Sourcepub fn containing_ways_with_role(
self,
role: &'a str,
set: impl Into<Cow<'a, Set<'a>>>,
) -> Self
pub fn containing_ways_with_role( self, role: &'a str, set: impl Into<Cow<'a, Set<'a>>>, ) -> Self
Restrict this set to only elements that have a Way in this set as a member, and that membership has the given role. See RecurseFilter::ContainingWays.
Sourcepub fn containing_relations(self, set: impl Into<Cow<'a, Set<'a>>>) -> Self
pub fn containing_relations(self, set: impl Into<Cow<'a, Set<'a>>>) -> Self
Restrict this set to only elements that have a Relation in this set as a member. See RecurseFilter::ContainingRelations.
Sourcepub fn containing_relations_with_role(
self,
role: &'a str,
set: impl Into<Cow<'a, Set<'a>>>,
) -> Self
pub fn containing_relations_with_role( self, role: &'a str, set: impl Into<Cow<'a, Set<'a>>>, ) -> Self
Restrict this set to only elements that have a Relation in this set as a member, and that membership has the given role. See RecurseFilter::ContainingRelations.