pub fn to_shouty_snake_case(s: &str) -> StringExpand description
Convert a type name to SHOUTY_SNAKE_CASE.
Used to reconstruct the conventional enum-value prefix from an enum’s proto
name so it can be stripped: RuleLevel → RULE_LEVEL (then values like
RULE_LEVEL_HIGH lose the RULE_LEVEL_ prefix). An underscore is inserted
at each lower→upper boundary and at acronym→word boundaries
(HTTPServer → HTTP_SERVER); existing underscores are preserved without
doubling.