Skip to content

enum

Action

pub enum Action {
    Set(String, Expr),
    Command(Expr),
    If(Expr, Box<Action>, Option<Box<Action>>),
}

One step of a handler.

Variants

Set

Set(String, Expr)

name <- expr

Command

Command(Expr)

emit("name", value), navigate("/path"), post(url, body, ok), reload(posts)

If

If(Expr, Box<Action>, Option<Box<Action>>)

if cond then step or if cond then step else step: the step whose condition holds (read, like every step, from the state before).

Methods

leaves

pub fn leaves(&self) -> Vec<&Action>

Every set and command it can run, in every branch.

references

pub fn references(&self, bound: &mut Vec<String>, out: &mut BTreeSet<String>)

Names the step reads (a command's handler names excluded).

Trait implementations