Skip to main content

FilterSetBuilder

Struct FilterSetBuilder 

Source
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>

Source

pub fn with_id(self, id: i64) -> Self

Restrict this set to only elements with the given identifier. See FilterSet::id_filters.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

pub fn with_tags(self, tags: impl IntoIterator<Item = &'a str>) -> Self

Restrict this set to only elements that have tags of the given names. See TagFilter::Exists.

Source

pub fn without_tags(self, tags: impl IntoIterator<Item = &'a str>) -> Self

Restrict this set to only elements that do not have tags of the given names. See TagFilter::NotExists.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Source

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.

Trait Implementations§

Source§

impl<'a> Into<Cow<'a, Set<'a>>> for FilterSetBuilder<'a>

Source§

fn into(self) -> Cow<'a, Set<'a>>

Converts this type into the (usually inferred) input type.
Source§

impl<'a> Into<QueryBuilder<'a>> for FilterSetBuilder<'a>

Source§

fn into(self) -> QueryBuilder<'a>

Converts this type into the (usually inferred) input type.
Source§

impl<'a> Into<Set<'a>> for FilterSetBuilder<'a>

Source§

fn into(self) -> Set<'a>

Converts this type into the (usually inferred) input type.
Source§

impl<'a> IntoIterator for FilterSetBuilder<'a>

Source§

type Item = FilterSetBuilder<'a>

The type of the elements being iterated over.
Source§

type IntoIter = IntoIter<<FilterSetBuilder<'a> as IntoIterator>::Item, 1>

Which kind of iterator are we turning this into?
Source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
Source§

impl<'a> ToQuery<'a> for FilterSetBuilder<'a>

Source§

fn to_query(self) -> QueryBuilder<'a>

Convert this type into a QueryBuilder.
Source§

impl<'a> UnionWith<'a> for FilterSetBuilder<'a>

Source§

fn union_with(self, other: impl Into<Cow<'a, Set<'a>>>) -> UnionSetBuilder<'a>

Combine this Set together with another into a UnionSet.

Auto Trait Implementations§

§

impl<'a> Freeze for FilterSetBuilder<'a>

§

impl<'a> RefUnwindSafe for FilterSetBuilder<'a>

§

impl<'a> Send for FilterSetBuilder<'a>

§

impl<'a> Sync for FilterSetBuilder<'a>

§

impl<'a> Unpin for FilterSetBuilder<'a>

§

impl<'a> UnsafeUnpin for FilterSetBuilder<'a>

§

impl<'a> UnwindSafe for FilterSetBuilder<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more