Struct fxbox_thinkerbell::ast::Rule [] [src]

pub struct Rule<Ctx> where Ctx: Context {
    pub conditions: Vec<Match<Ctx>>,
    pub execute: Vec<Statement<Ctx>>,
    pub phantom: Phantom<Ctx>,
}

A single rule, i.e. "when some condition becomes true, do something".

Fields

conditions

The condition in which to execute the trigger. The condition is matched once all the Match branches are true. Whenever conditions was false and becomes true, we execute execute.

execute

Stuff to do once condition is met.

phantom

Trait Implementations

impl<Ctx: Deserialize> Deserialize for Rule<Ctx> where Ctx: Context

fn deserialize<__D>(deserializer: &mut __D) -> Result<Rule<Ctx>, __D::Error> where __D: Deserializer

impl<Ctx: Serialize> Serialize for Rule<Ctx> where Ctx: Context

fn serialize<__S>(&self, serializer: &mut __S) -> Result<(), __S::Error> where __S: Serializer