automata/fsevent/op

Values

pub fn all_ops() -> set.Set(ast.Op)

All ops the differ knows about, in canonical order.

pub fn combine(
  left left: set.Set(ast.Op),
  right right: set.Set(ast.Op),
) -> set.Set(ast.Op)

Union of two op sets.

pub fn empty_ops() -> set.Set(ast.Op)

The empty op set. Used by WatchEvent constructors that build up op sets incrementally.

pub fn has(ops ops: set.Set(ast.Op), op op: ast.Op) -> Bool

True when ops contains op.

pub fn op_to_string(op op: ast.Op) -> String

Render an op as one of "CREATE", "WRITE", "REMOVE", "RENAME", "CHMOD".

pub fn ops_from_list(ops ops: List(ast.Op)) -> set.Set(ast.Op)

Build an op set from a list. Duplicates are collapsed (set semantics).

pub fn ops_to_string(ops ops: set.Set(ast.Op)) -> String

Render an op set as "CREATE|WRITE" (canonical order). Empty sets render as the empty string.

pub fn single_op(op op: ast.Op) -> set.Set(ast.Op)

A single-element op set.

pub fn to_list(ops ops: set.Set(ast.Op)) -> List(ast.Op)

Convert an op set into a list whose order is fixed across runs and targets: [Create, Write, Remove, Rename, Chmod]. Stable rendering matters for tests that compare event sequences across the BEAM and JavaScript targets.

Search Document