Enum rustc::hir::Item_
[−]
[src]
pub enum Item_ {
ItemExternCrate(Option<Name>),
ItemUse(P<Path>, UseKind),
ItemStatic(P<Ty>, Mutability, BodyId),
ItemConst(P<Ty>, BodyId),
ItemFn(P<FnDecl>, Unsafety, Constness, Abi, Generics, BodyId),
ItemMod(Mod),
ItemForeignMod(ForeignMod),
ItemGlobalAsm(P<GlobalAsm>),
ItemTy(P<Ty>, Generics),
ItemEnum(EnumDef, Generics),
ItemStruct(VariantData, Generics),
ItemUnion(VariantData, Generics),
ItemTrait(IsAuto, Unsafety, Generics, TyParamBounds, HirVec<TraitItemRef>),
ItemTraitAlias(Generics, TyParamBounds),
ItemAutoImpl(Unsafety, TraitRef),
ItemImpl(Unsafety, ImplPolarity, Defaultness, Generics, Option<TraitRef>, P<Ty>, HirVec<ImplItemRef>),
}🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Variants
ItemExternCrate(Option<Name>)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
An extern crate item, with optional original crate name,
e.g. extern crate foo or extern crate foo_bar as foo
ItemUse(P<Path>, UseKind)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
use foo::bar::*; or use foo::bar::baz as quux;
or just
use foo::bar::baz; (with as baz implicitly on the right)
ItemStatic(P<Ty>, Mutability, BodyId)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
A static item
ItemConst(P<Ty>, BodyId)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
A const item
ItemFn(P<FnDecl>, Unsafety, Constness, Abi, Generics, BodyId)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
A function declaration
ItemMod(Mod)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
A module
ItemForeignMod(ForeignMod)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
An external module
ItemGlobalAsm(P<GlobalAsm>)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Module-level inline assembly (from global_asm!)
ItemTy(P<Ty>, Generics)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
A type alias, e.g. type Foo = Bar<u8>
ItemEnum(EnumDef, Generics)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
An enum definition, e.g. enum Foo<A, B> {C<A>, D<B>}
ItemStruct(VariantData, Generics)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
A struct definition, e.g. struct Foo<A> {x: A}
ItemUnion(VariantData, Generics)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
A union definition, e.g. union Foo<A, B> {x: A, y: B}
ItemTrait(IsAuto, Unsafety, Generics, TyParamBounds, HirVec<TraitItemRef>)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Represents a Trait Declaration
ItemTraitAlias(Generics, TyParamBounds)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Represents a Trait Alias Declaration
ItemAutoImpl(Unsafety, TraitRef)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Auto trait implementations
impl Trait for .. {}
ItemImpl(Unsafety, ImplPolarity, Defaultness, Generics, Option<TraitRef>, P<Ty>, HirVec<ImplItemRef>)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
An implementation, eg impl<A> Trait for Foo { .. }
Methods
impl Item_[src]
pub fn descriptive_variant(&self) -> &str[src]
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn adt_kind(&self) -> Option<AdtKind>[src]
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn generics(&self) -> Option<&Generics>[src]
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
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]
fn encode<__S: Encoder>(&self, __arg_0: &mut __S) -> Result<(), __S::Error>[src]
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
impl Decodable for Item_[src]
fn decode<__D: Decoder>(__arg_0: &mut __D) -> Result<Item_, __D::Error>[src]
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
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
impl<'tcx> HashStable<StableHashingContext<'tcx>> for Item_[src]
fn hash_stable<W: StableHasherResult>(
&self,
__ctx: &mut StableHashingContext<'tcx>,
__hasher: &mut StableHasher<W>
)[src]
&self,
__ctx: &mut StableHashingContext<'tcx>,
__hasher: &mut StableHasher<W>
)
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?