Struct alexandria::query::TagQuery[][src]

pub struct TagQuery;

An API type to build tag queries

Following is an overview of the type constraints available.

SetQuery typeConstraints model
SetQuery::IntersectA ∩ B
SetQuery::SubsetA ⊆ B
SetQuery::EqualsA = B
SetQuery::Not¬(A ∩ B)

Implementations

impl TagQuery[src]

pub fn intersect<T: Into<TagSet>>(&self, t: T) -> Query[src]

Build a simple intersect query

An intersection is defined by set theory as any overlap between sets A and B, meaning that neither A nor B needs to be contained in the other (A ∩ B). This is the weakest tag constraint, as it doesn’t filter sub-, or equality sets.

pub fn subset<T: Into<TagSet>>(&self, t: T) -> Query[src]

Build a subset query

A subset is defined by set theory as a set A, which is contained in it’s entirety by a set B. The two sets may be equals: A ⊆ B. This is the most common set query to use because it allows constrained tags, without disallowing additional tags that are irrelevant to the query program.

pub fn equals<T: Into<TagSet>>(&self, t: T) -> Query[src]

Build an equality set query

An equality set checks for an exact match of tags in the query, meaning that additional tags will make the comparison fail.

This query type is most likely a lot less useful than subset(), but can still be used as part of a processing pipeline that adds tags to records over time.

pub fn not<T: Into<TagSet>>(&self, t: T) -> Query[src]

Build an exclusion set query

This query type can be considered the opposite of intersect(), because it will fail the comparison of sets if even a single tag is shared between them.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,