Type Definition syntax::ast::NestedMetaItem[][src]

type NestedMetaItem = Spanned<NestedMetaItemKind>;

A spanned compile-time attribute list item.

Methods

impl NestedMetaItem
[src]

Returns the MetaItem if self is a NestedMetaItemKind::MetaItem.

Returns the Lit if self is a NestedMetaItemKind::Literal.

Returns the Span for self.

Returns true if this list item is a MetaItem with a name of name.

Returns the name of the meta item, e.g. foo in #[foo], #[foo="bar"] and #[foo(bar)], if self is a MetaItem

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

Returns a name and single literal value tuple of the MetaItem.

Returns a MetaItem if self is a MetaItem with Kind Word.

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

Returns true if the variant is MetaItem.

Returns true if the variant is Literal.

Returns true if self is a MetaItem and the meta item is a word.

Returns true if self is a MetaItem and the meta item is a ValueString.

Returns true if self is a MetaItem and the meta item is a list.