ToTypeName

Trait ToTypeName 

Source
pub trait ToTypeName {
    // Required method
    fn to_type_name(&self) -> String;

    // Provided method
    fn to_type_ident(&self, span: Span) -> Ident { ... }
}
Expand description

Helper trait for generating a (pascal case) Rust type name/identifier. Particularly helpful in derive macros when generating enum variants for struct fields.

Required Methods§

Provided Methods§

Source

fn to_type_ident(&self, span: Span) -> Ident

Implementations on Foreign Types§

Source§

impl ToTypeName for &str

Source§

impl ToTypeName for &Ident

Source§

impl ToTypeName for String

Implementors§