MCPcopy Create free account
hub / github.com/csskit/csskit / to_variant_name

Method to_variant_name

crates/csskit_proc_macro/src/generate.rs:97–100  ·  view source on GitHub ↗
(&self, size_hint: usize)

Source from the content-addressed store, hash-verified

95
96impl ToFieldName for DefIdent {
97 fn to_variant_name(&self, size_hint: usize) -> Ident {
98 let pascal = keyword_to_pascal(&self.0);
99 format_ident!("{}", if size_hint > 0 { pluralize(pascal) } else { pascal })
100 }
101}
102
103impl ToFieldName for DefType {

Callers 2

to_typesMethod · 0.80
generate_definitionMethod · 0.80

Calls 6

keyword_to_pascalFunction · 0.85
collectMethod · 0.80
iterMethod · 0.80
derefMethod · 0.45
as_strMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected