Enum rustc_typeck::hir::Item_ [] [src]

pub enum Item_ {
    ItemExternCrate(Option<Name>),
    ItemUse(P<Spanned<ViewPath_>>),
    ItemStatic(P<Ty>, MutabilityP<Expr>),
    ItemConst(P<Ty>, P<Expr>),
    ItemFn(P<FnDecl>, UnsafetyConstnessAbiGenericsP<Block>),
    ItemMod(Mod),
    ItemForeignMod(ForeignMod),
    ItemTy(P<Ty>, Generics),
    ItemEnum(EnumDefGenerics),
    ItemStruct(VariantDataGenerics),
    ItemTrait(UnsafetyGenericsP<[TyParamBound]>, P<[TraitItem]>),
    ItemDefaultImpl(UnsafetyTraitRef),
    ItemImpl(UnsafetyImplPolarityGenericsOption<TraitRef>, P<Ty>, P<[ImplItem]>),
}
Unstable (rustc_private)

Variants

ItemExternCrate(Option<Name>)
Unstable (rustc_private)

Anextern crate item, with optional original crate name,

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

ItemUse(P<Spanned<ViewPath_>>)
Unstable (rustc_private)

A use or pub use item

ItemStatic(P<Ty>, MutabilityP<Expr>)
Unstable (rustc_private)

A static item

ItemConst(P<Ty>, P<Expr>)
Unstable (rustc_private)

A const item

ItemFn(P<FnDecl>, UnsafetyConstnessAbiGenericsP<Block>)
Unstable (rustc_private)

A function declaration

ItemMod(Mod)
Unstable (rustc_private)

A module

ItemForeignMod(ForeignMod)
Unstable (rustc_private)

An external module

ItemTy(P<Ty>, Generics)
Unstable (rustc_private)

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

ItemEnum(EnumDefGenerics)
Unstable (rustc_private)

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

ItemStruct(VariantDataGenerics)
Unstable (rustc_private)

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

ItemTrait(UnsafetyGenericsP<[TyParamBound]>, P<[TraitItem]>)
Unstable (rustc_private)

Represents a Trait Declaration

ItemDefaultImpl(UnsafetyTraitRef)
Unstable (rustc_private)

impl Trait for .. {}

ItemImpl(UnsafetyImplPolarityGenericsOption<TraitRef>, P<Ty>, P<[ImplItem]>)
Unstable (rustc_private)

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

Methods

impl Item_

fn descriptive_variant(&self) -> &str

Trait Implementations

Derived Implementations

impl Debug for Item_

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

Formats the value using the given formatter.

impl Hash for Item_

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

Feeds this value into the state given, updating the hasher as necessary.

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

Feeds a slice of this type into the state provided.

impl Decodable for Item_

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

impl Encodable for Item_

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

impl Eq for Item_

impl PartialEq<Item_> for Item_

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

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

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

This method tests for !=.

impl Clone for Item_

fn clone(&self) -> Item_

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more