Skip to main content

keyword_safe_ident

Function keyword_safe_ident 

Source
pub fn keyword_safe_ident(name: &str) -> Ident
Expand description

Infallible keyword-safe identifier for contexts without a diagnostics channel (schema property field names).

Keywords become raw identifiers; the non-raw-able keywords get a trailing underscore (selfself_). Any other string is passed through unchanged, matching the prior behaviour of the per-module helper this replaces.