syn_ext/ident.rs
1use syn::Ident;
2
3/// Shortcut to get [syn::Ident](struct@syn::Ident) from various types
4pub trait GetIdent {
5 /// Returns reference of ident if its [syn::Path] is [syn::Ident](struct@syn::Ident); Otherwise None
6 ///
7 /// Any [crate::ext::GetPath] also implements `GetIdent`.
8 fn get_ident(&self) -> Option<&Ident>;
9}