[][src]Enum quaint::ast::ConditionTree

pub enum ConditionTree<'a> {
    And(Box<Expression<'a>>, Box<Expression<'a>>),
    Or(Box<Expression<'a>>, Box<Expression<'a>>),
    Not(Box<Expression<'a>>),
    Single(Box<Expression<'a>>),
    NoCondition,
    NegativeCondition,
}

Tree structures and leaves for condition building.

Variants

And(Box<Expression<'a>>, Box<Expression<'a>>)

(left_expression AND right_expression)

Or(Box<Expression<'a>>, Box<Expression<'a>>)

(left_expression OR right_expression)

Not(Box<Expression<'a>>)

(NOT expression)

Single(Box<Expression<'a>>)

A single expression leaf

NoCondition

A leaf that does nothing to the condition, 1=1

NegativeCondition

A leaf that cancels the condition, 1=0

Methods

impl<'a> ConditionTree<'a>[src]

pub fn and<E, J>(left: E, right: J) -> ConditionTree<'a> where
    E: Into<Expression<'a>>,
    J: Into<Expression<'a>>, 
[src]

An AND statement, is true when both sides are true.

pub fn or<E, J>(left: E, right: J) -> ConditionTree<'a> where
    E: Into<Expression<'a>>,
    J: Into<Expression<'a>>, 
[src]

An OR statement, is true when one side is true.

pub fn not<E>(left: E) -> ConditionTree<'a> where
    E: Into<Expression<'a>>, 
[src]

A NOT statement, is true when the expression is false.

pub fn single<E>(left: E) -> ConditionTree<'a> where
    E: Into<Expression<'a>>, 
[src]

A single leaf, is true when the expression is true.

pub fn invert_if(self, invert: bool) -> ConditionTree<'a>[src]

Inverts the entire condition tree if condition is met.

Trait Implementations

impl<'a> Clone for ConditionTree<'a>[src]

impl<'a> Debug for ConditionTree<'a>[src]

impl<'a> Default for ConditionTree<'a>[src]

impl<'a> From<Compare<'a>> for ConditionTree<'a>[src]

impl<'a> From<ConditionTree<'a>> for Expression<'a>[src]

impl<'a> From<Select<'a>> for ConditionTree<'a>[src]

impl<'a> PartialEq<ConditionTree<'a>> for ConditionTree<'a>[src]

impl<'a> StructuralPartialEq for ConditionTree<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for ConditionTree<'a>

impl<'a> Send for ConditionTree<'a>

impl<'a> Sync for ConditionTree<'a>

impl<'a> Unpin for ConditionTree<'a>

impl<'a> UnwindSafe for ConditionTree<'a>

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> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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