Skip to main content

display_type_name

Function display_type_name 

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

#2087: the name a user reads for a type contract_types_for may have filed under a qualified key. A key is the declaring context’s namespace, __, and the declaration’s own name (shop_order__Code); the declaration carries the key as its name too, so every path that prints a type name to a user goes through this, and reads Code. Any other name is returned as is: a key’s prefix is a lowercase namespace and its last segment a capitalised type name, which a declared type name never is.