Enum syntex_syntax::ast::Item_ [] [src]

pub enum Item_ {
    ItemExternCrate(Option<Name>),
    ItemUse(P<ViewPath>),
    ItemStatic(P<Ty>, Mutability, P<Expr>),
    ItemConst(P<Ty>, P<Expr>),
    ItemFn(P<FnDecl>, Unsafety, Constness, Abi, Generics, P<Block>),
    ItemMod(Mod),
    ItemForeignMod(ForeignMod),
    ItemTy(P<Ty>, Generics),
    ItemEnum(EnumDef, Generics),
    ItemStruct(VariantData, Generics),
    ItemTrait(Unsafety, Generics, TyParamBounds, Vec<P<TraitItem>>),
    ItemDefaultImpl(Unsafety, TraitRef),
    ItemImpl(Unsafety, ImplPolarity, Generics, Option<TraitRef>, P<Ty>, Vec<P<ImplItem>>),
    ItemMac(Mac),
}

Variants

ItemExternCrate

Anextern crate item, with optional original crate name,

e.g. extern crate foo or extern crate foo_bar as foo

ItemUse

A use or pub use item

ItemStatic

A static item

ItemConst

A const item

ItemFn

A function declaration

ItemMod

A module

ItemForeignMod

An external module

ItemTy

A type alias, e.g. type Foo = Bar<u8>

ItemEnum

An enum definition, e.g. enum Foo<A, B> {C<A>, D<B>}

ItemStruct

A struct definition, e.g. struct Foo<A> {x: A}

ItemTrait

Represents a Trait Declaration

ItemDefaultImpl
ItemImpl

An implementation, eg impl<A> Trait for Foo { .. }

ItemMac

A macro invocation (which includes macro definition)

Methods

impl Item_

fn descriptive_variant(&self) -> &str

Trait Implementations

Derived Implementations

impl Debug for Item_

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl Hash for Item_

fn hash<__H: Hasher>(&self, __arg_0: &mut __H)

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher

impl Decodable for Item_

fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<Item_, __D::Error>

impl Encodable for Item_

fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>

impl Eq for Item_

impl PartialEq for Item_

fn eq(&self, __arg_0: &Item_) -> bool

fn ne(&self, __arg_0: &Item_) -> bool

impl Clone for Item_

fn clone(&self) -> Item_

fn clone_from(&mut self, source: &Self)