/// Test if the item has any attributes
Test if the item has any attributes
Test if the item has any attributes
pub fn attributes(&self) -> &[ast::Attribute] {
        match self {
            Self::Use(item) => &item.attributes,
            Self::Fn(item) => &item.attributes,
            Self::Enum(item) => &item.attributes,
            Self::Struct(item) => &item.attributes,
            Self::Impl(item) => &item.attributes,
            Self::Mod(item) => &item.attributes,
            Self::Const(item) => &item.attributes,
            Self::MacroCall(item) => &item.attributes,
        }
    }
pub fn attributes ( & self ) -> & [ ast :: Attribute ] { match self { Self :: Use ( item ) => & item . attributes , Self :: Fn ( item ) => & item . attributes , Self :: Enum ( item ) => & item . attributes , Self :: Struct ( item ) => & item . attributes , Self :: Impl ( item ) => & item . attributes , Self :: Mod ( item ) => & item . attributes , Self :: Const ( item ) => & item . attributes , Self :: MacroCall ( item ) => & item . attributes , } }
Test if the item has any attributes
Test if the item has any attributes
&self