Enum rustc::hir::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, HirVec<TraitItem>), ItemDefaultImpl(Unsafety, TraitRef), ItemImpl(Unsafety, ImplPolarity, Generics, Option<TraitRef>, P<Ty>, HirVec<ImplItem>), }
rustc_private
)Variants
ItemExternCrate(Option<Name>)
rustc_private
)Anextern crate
item, with optional original crate name,
e.g. extern crate foo
or extern crate foo_bar as foo
ItemUse(P<ViewPath>)
rustc_private
)A use
or pub use
item
ItemStatic(P<Ty>, Mutability, P<Expr>)
rustc_private
)A static
item
ItemConst(P<Ty>, P<Expr>)
rustc_private
)A const
item
ItemFn(P<FnDecl>, Unsafety, Constness, Abi, Generics, P<Block>)
rustc_private
)A function declaration
ItemMod(Mod)
rustc_private
)A module
ItemForeignMod(ForeignMod)
rustc_private
)An external module
ItemTy(P<Ty>, Generics)
rustc_private
)A type alias, e.g. type Foo = Bar<u8>
ItemEnum(EnumDef, Generics)
rustc_private
)An enum definition, e.g. enum Foo<A, B> {C<A>, D<B>}
ItemStruct(VariantData, Generics)
rustc_private
)A struct definition, e.g. struct Foo<A> {x: A}
ItemTrait(Unsafety, Generics, TyParamBounds, HirVec<TraitItem>)
rustc_private
)Represents a Trait Declaration
ItemDefaultImpl(Unsafety, TraitRef)
rustc_private
)impl Trait for .. {}
ItemImpl(Unsafety, ImplPolarity, Generics, Option<TraitRef>, P<Ty>, HirVec<ImplItem>)
rustc_private
)An implementation, eg impl<A> Trait for Foo { .. }
Methods
impl Item_
[src]
fn descriptive_variant(&self) -> &str
Trait Implementations
Derived Implementations
impl Debug for Item_
[src]
impl Hash for Item_
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
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_
[src]
impl Encodable for Item_
[src]
impl Eq for Item_
[src]
impl PartialEq for Item_
[src]
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_
[src]
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