[][src]Enum json_rules_engine::Condition

pub enum Condition {
    And {
        and: Vec<Condition>,
    },
    Or {
        or: Vec<Condition>,
    },
    Not {
        not: Box<Condition>,
    },
    AtLeast {
        should_minimum_meet: usize,
        conditions: Vec<Condition>,
    },
    Condition {
        field: String,
        constraint: Constraint,
    },
}

Representation of a node in the rules tree

It is unnecessary to interact with this type outside of calling Rule::check(), to construct the rules tree use the convenience functions in the module root.

Variants

And

Fields of And

and: Vec<Condition>
Or

Fields of Or

or: Vec<Condition>
Not

Fields of Not

not: Box<Condition>
AtLeast

Fields of AtLeast

should_minimum_meet: usizeconditions: Vec<Condition>
Condition

Fields of Condition

field: Stringconstraint: Constraint

Implementations

impl Condition[src]

pub fn check_value(&self, info: &Value) -> ConditionResult[src]

Starting at this node, recursively check (depth-first) any child nodes and aggregate the results

Trait Implementations

impl Debug for Condition[src]

impl<'de> Deserialize<'de> for Condition[src]

impl Serialize for Condition[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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

impl<T> Instrument for T[src]

impl<T> Instrument 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.