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(..)]
.
Tuple Fields of List
0: Vec<NestedMetaItem>
NameValue(Lit)
Name value meta item.
E.g., feature = "foo"
as in #[feature = "foo"]
.
Tuple Fields of NameValue
0: Lit
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 MetaItemKind
impl !Send for MetaItemKind
impl !Sync for MetaItemKind
impl Unpin for MetaItemKind
impl !UnwindSafe for MetaItemKind
Blanket Implementations
Mutably borrows from an owned value. Read more
Layout
Note: Most layout information is completely unstable and may even differ between compilations. 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
Size for each variant:
Word
: 0 bytesList
: 24 bytesNameValue
: 48 bytes