Struct alexandria::query::TagQuery [−][src]
An API type to build tag queries
Following is an overview of the type constraints available.
SetQuery type | Constraints model |
---|---|
SetQuery::Intersect | A ∩ B |
SetQuery::Subset | A ⊆ B |
SetQuery::Equals | A = 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
impl RefUnwindSafe for TagQuery
impl Send for TagQuery
impl Sync for TagQuery
impl Unpin for TagQuery
impl UnwindSafe for TagQuery
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,