Enum rustc_ast::ast::MetaItemKind [−][src]
pub enum MetaItemKind {
Word,
List(Vec<NestedMetaItem>),
NameValue(Lit),
}Expand description
A compile-time attribute item.
E.g., #[test], #[derive(..)] or #[feature = "foo"].
Variants
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
fn name_value_from_tokens(
tokens: &mut impl Iterator<Item = TokenTree>
) -> Option<MetaItemKind>fn from_tokens(
tokens: &mut Peekable<impl Iterator<Item = TokenTree>>
) -> Option<MetaItemKind>Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for MetaItemKindimpl !Send for MetaItemKindimpl !Sync for MetaItemKindimpl Unpin for MetaItemKindimpl !UnwindSafe for MetaItemKindBlanket Implementations
Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may be different between compiler versions and platforms. The only exception is types with certain repr(...) attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 56 bytes