Skip to main content

make_field_ident

Function make_field_ident 

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

Create a field identifier, escaping Rust keywords.

Most keywords use raw identifiers (r#type). The keywords self, super, Self, crate cannot be raw identifiers and are suffixed with _ instead (e.g. self_), matching prost’s convention.