[][src]Enum qualia::query::QueryNode

pub enum QueryNode {
    Empty,
    PropEqual {
        name: String,
        value: PropValue,
    },
    PropLike {
        name: String,
        pattern: String,
    },
    And(Vec<QueryNode>),
}

A node within a query tree.

For all but advanced cases, QueryBuilder should be used (via Q) rather than creating QueryNode objects directly.

Variants

Empty

Will match all objects.

PropEqual

Will match objects that have the given property with exactly the given value.

Fields of PropEqual

name: Stringvalue: PropValue
PropLike

Will match objects that the given property with contents matching the given pattern.

The pattern is composed of a set of words, each one of which must exist in order (though there may be other words in between). Each word may be just an alphanumeric word or may contain one or more *'s, each of which will match zero or more characters.

For example, the following patterns will match the property value "why the lucky stiff":

  • why
  • why lucky
  • why luck*
  • why luck*y
  • *tiff
  • the *ck*

while the following patterns will not:

  • wh
  • lucky why
  • matts
  • wha*

Fields of PropLike

name: Stringpattern: String

Will match all objects that match each of the contained criteria.

Trait Implementations

impl Debug for QueryNode[src]

impl Into<QueryNode> for QueryBuilder[src]

impl PartialEq<QueryNode> for QueryNode[src]

impl StructuralPartialEq for QueryNode[src]

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, U> Into<U> for T where
    U: From<T>, 
[src]

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.