Skip to main content

violation_code_text

Function violation_code_text 

Source
pub fn violation_code_text(code: CommitOnlyViolationCode) -> &'static str
Expand description

What: The kebab-case spelling of a code. &'static str is text baked into the program. Why: The event format predates this module and its spellings must not drift.

In TS you’d write (pseudocode):

const text = code; // the union member already is the string