1use syn::Path; 2 3/// Helper trait for holding idents. 4pub trait AttributeIdent { 5 /// Holds the idents. 6 const IDENTS: &'static [&'static str]; 7 8 /// Check if path exists in the idents. 9 fn is_ident(path: &Path) -> bool { 10 Self::IDENTS.iter().any(|ident| path.is_ident(ident)) 11 } 12}