Skip to main content

format_ident

Function format_ident 

Source
pub fn format_ident<'a, S>(s: S) -> String
where S: Into<Cow<'a, str>>,
Expand description

Format the passed string s into a valid Rust identifier by adding an underscore if it starts with a numeric character or is a Rust keyword.