automata/event/builtin/filter

Values

pub fn by_custom_kind(
  kind kind: String,
) -> filter.Filter(body.EventBody)
pub fn by_path_contains(
  needle needle: String,
) -> filter.Filter(body.EventBody)

Match FileSystem(_) events whose path contains needle.

pub fn by_path_prefix(
  prefix prefix: String,
) -> filter.Filter(body.EventBody)

Match FileSystem(_) events whose path starts with prefix. prefix is matched against the canonical string rendering of the event’s path (the new path for renames).

pub fn by_path_suffix(
  suffix suffix: String,
) -> filter.Filter(body.EventBody)

Match FileSystem(_) events whose path ends with suffix.

pub fn by_plan_id(id id: String) -> filter.Filter(body.EventBody)

Match scheduled events whose plan_id equals id.

pub fn by_schedule_kind(
  kind kind: body.ScheduleKind,
) -> filter.Filter(body.EventBody)

Match scheduled events whose schedule_kind equals kind.

pub fn is_file_event() -> filter.Filter(body.EventBody)

Match any FileSystem(_) body, irrespective of op.

pub fn is_file_with_op(
  op op: ast.Op,
) -> filter.Filter(body.EventBody)

Match FileSystem(_) bodies whose wrapped WatchEvent carries op. Replaces the legacy is_file_created/modified/deleted/renamed helpers.

pub fn is_scheduled() -> filter.Filter(body.EventBody)

Match any event whose body is Scheduled(_, _, _).

Search Document