Struct syntax::ast::Item[][src]

pub struct Item {
    pub ident: Ident,
    pub attrs: Vec<Attribute>,
    pub id: NodeId,
    pub node: ItemKind,
    pub vis: Visibility,
    pub span: Span,
    pub tokens: Option<TokenStream>,
}

An item

The name might be a dummy name in case of anonymous items

Fields

Original tokens this item was parsed from. This isn't necessarily available for all items, although over time more and more items should have this be Some. Right now this is primarily used for procedural macros, notably custom attributes.

Note that the tokens here do not include the outer attributes, but will include inner attributes.

Trait Implementations

impl Clone for Item
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Item
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Item
[src]

impl Encodable for Item
[src]

impl Decodable for Item
[src]

impl Hash for Item
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for Item
[src]

Formats the value using the given formatter. Read more

impl HasAttrs for Item
[src]

Important traits for &'a [u8]

Auto Trait Implementations

impl !Send for Item

impl !Sync for Item