Skip to main content

Crate smix_verbs

Crate smix_verbs 

Source
Expand description

smix-verbs — canonical verb table.

§Reviewer invariant

Any new yaml verb supported by smix MUST land here first as a VerbEntry in VERB_TABLE. Both smix-adapter-maestro parser and smix-migrate codemod depend on this crate; adding an entry automatically makes the parser accept both canonical forms and the codemod handle the rename.

§Design

  • Pure data crate — no runtime state, no async, no I/O.
  • Static table&'static [VerbEntry] for zero-alloc lookup.
  • Two names per entrymaestro_name (the yaml surface maestro test authors know) and smix_name (the smix-canonical form). If they’re identical (e.g. runFlow), the entry still appears with both fields set to the same string.
  • Category — grouping for reviewer sanity checks + future auto-generated cross-platform parity tables (Phase F).
  • Arg shape — reserved for future codemod arg-transform lookup; currently informational.

Structs§

VerbEntry
One verb in the canonical table.

Enums§

ArgShape
Shape of a verb’s argument. Determines how the parser + codemod treat the yaml body.
VerbCategory
Semantic grouping for a verb.

Statics§

VERB_TABLE
Static canonical verb table. Ordering: category-alphabetized for grep-ability; each row is (maestro, smix, category, shape).

Functions§

find_by_maestro
Look up a verb entry by its maestro-canonical name.
find_by_smix
Look up a verb entry by its smix-canonical name. May return multiple different entries because smix names are not unique (e.g. pressKey is the smix name for both pressKey and back); we return the first match. Consumers that need disambiguation should use find_by_maestro or scan VERB_TABLE directly.
is_known_verb
True if name matches either the maestro or smix form of any known verb.
verbs_in_category
Return every entry in a given category. Iteration order is the insertion order in VERB_TABLE.