Expand description
Sealed kebab-case label vocabulary shared across host bindings.
See host_label for the formatter / parser pairs.
Sealed kebab-case label vocabulary for cross-host serialisation.
Hosts (FFI / wasm / gdext / future) all need to render core enums as
short string labels — "idle", "normal", "up" — and parse them
back. Letting each host coin its own labels would let them drift, so
this module is the single source of truth.
The label vocabulary is part of every host’s public contract: changing
a label string is a breaking change for downstream consumers
(TypeScript bindings, Godot scripts, GameMaker projects, …). New
variants on #[non_exhaustive] core enums must add a label here in
the same release; the formatters fall back to a stable default
("unknown", "out-of-service", "either") for unrecognised
variants so a missing label does not panic the host.
Mirrors the host_error::ErrorKind cross-host vocabulary work.
Functions§
- direction
- Format a
Directionas"up"/"down"/"either". - elevator_
phase - Format an
ElevatorPhaseas a kebab-case label suitable for CSS class names, debug overlays, and serialised host events. - parse_
call_ direction - Parse a kebab-case label into a
CallDirection. - parse_
service_ mode - Inverse of
service_mode: parse a kebab-case label back to aServiceMode. Unknown labels returnNone. - service_
mode - Format a
ServiceModeas a kebab-case label.