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
ident: Ident
attrs: Vec<Attribute>
id: NodeId
node: ItemKind
vis: Visibility
span: Span
tokens: Option<TokenStream>
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]
fn clone(&self) -> Item
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq for Item
[src]
fn eq(&self, __arg_0: &Item) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Item) -> bool
[src]
This method tests for !=
.
impl Eq for Item
[src]
impl Encodable for Item
[src]
impl Decodable for Item
[src]
impl Hash for Item
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for Item
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more