Trait syntex_syntax::attr::AttrMetaMethods [] [src]

pub trait AttrMetaMethods {
    fn name(&self) -> InternedString;
    fn value_str(&self) -> Option<InternedString>;
    fn meta_item_list(&self) -> Option<&[P<MetaItem>]>;
    fn span(&self) -> Span;

    fn check_name(&self, name: &str) -> bool { ... }
}

Required Methods

fn name(&self) -> InternedString

Retrieve the name of the meta item, e.g. foo in #[foo], #[foo="bar"] and #[foo(bar)]

fn value_str(&self) -> Option<InternedString>

Gets the string value if self is a MetaItemKind::NameValue variant containing a string, otherwise None.

fn meta_item_list(&self) -> Option<&[P<MetaItem>]>

Gets a list of inner meta items from a list MetaItem type.

fn span(&self) -> Span

Provided Methods

fn check_name(&self, name: &str) -> bool

Implementors