[−][src]Enum rustc_ast::ast::MetaItemKind

pub enum MetaItemKind {
    Word,
    List(Vec<NestedMetaItem>),
    NameValue(Lit),
}

A compile-time attribute item.

E.g., #[test], #[derive(..)] or #[feature = "foo"].

Variants

Word

Word meta item.

E.g., test as in #[test].

List(Vec<NestedMetaItem>)

List meta item.

E.g., derive(..) as in #[derive(..)].

NameValue(Lit)

Name value meta item.

E.g., feature = "foo" as in #[feature = "foo"].

Implementations

impl MetaItemKind[src]

pub fn mac_args(&self, span: Span) -> MacArgs[src]

pub(in attr) fn token_trees_and_spacings(
    &self,
    span: Span
) -> Vec<TreeAndSpacing>
[src]

pub(in attr) fn list_from_tokens(
    tokens: TokenStream
) -> Option<MetaItemKind>
[src]

pub(in attr) fn name_value_from_tokens(
    tokens: &mut impl Iterator<Item = TokenTree>
) -> Option<MetaItemKind>
[src]

pub(in attr) fn from_mac_args(
    args: &MacArgs
) -> Option<MetaItemKind>
[src]

pub(in attr) fn from_tokens(
    tokens: &mut Peekable<impl Iterator<Item = TokenTree>>
) -> Option<MetaItemKind>
[src]

Trait Implementations

impl Clone for MetaItemKind[src]

impl Debug for MetaItemKind[src]

impl<__D: Decoder> Decodable<__D> for MetaItemKind[src]

impl<__E: Encoder> Encodable<__E> for MetaItemKind[src]

impl<__CTX> HashStable<__CTX> for MetaItemKind where
    __CTX: HashStableContext, 
[src]

Auto Trait Implementations

impl !RefUnwindSafe for MetaItemKind

impl !Send for MetaItemKind

impl !Sync for MetaItemKind

impl Unpin for MetaItemKind

impl !UnwindSafe for MetaItemKind

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone, 
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.