Enum rustc::hir::ItemKind [−][src]
pub enum ItemKind { ExternCrate(Option<Name>), Use(P<Path>, UseKind), Static(P<Ty>, Mutability, BodyId), Const(P<Ty>, BodyId), Fn(P<FnDecl>, FnHeader, Generics, BodyId), Mod(Mod), ForeignMod(ForeignMod), GlobalAsm(P<GlobalAsm>), Ty(P<Ty>, Generics), Existential(ExistTy), Enum(EnumDef, Generics), Struct(VariantData, Generics), Union(VariantData, Generics), Trait(IsAuto, Unsafety, Generics, GenericBounds, HirVec<TraitItemRef>), TraitAlias(Generics, GenericBounds), Impl(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
ExternCrate(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 if the crate was renamed.
E.g. extern crate foo
or extern crate foo_bar as foo
Use(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)
Static(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
Const(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
Fn(P<FnDecl>, FnHeader, 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
Mod(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
ForeignMod(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
GlobalAsm(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!)
Ty(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>
Existential(ExistTy)
🔬 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 existential type definition, e.g. existential type Foo: Bar;
Enum(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>}
Struct(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}
Union(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}
Trait(IsAuto, Unsafety, Generics, GenericBounds, 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
TraitAlias(Generics, GenericBounds)
🔬 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
Impl(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 ItemKind
[src]
impl ItemKind
pub fn descriptive_variant(&self) -> &str
[src]
pub fn descriptive_variant(&self) -> &str
🔬 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]
pub fn adt_kind(&self) -> Option<AdtKind>
🔬 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]
pub fn generics(&self) -> Option<&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?
Trait Implementations
impl Clone for ItemKind
[src]
impl Clone for ItemKind
fn clone(&self) -> ItemKind
[src]
fn clone(&self) -> ItemKind
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Encodable for ItemKind
[src]
impl Encodable for ItemKind
fn encode<__S: Encoder>(&self, s: &mut __S) -> Result<(), __S::Error>
[src]
fn encode<__S: Encoder>(&self, s: &mut __S) -> Result<(), __S::Error>
🔬 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 ItemKind
[src]
impl Decodable for ItemKind
fn decode<__D: Decoder>(d: &mut __D) -> Result<ItemKind, __D::Error>
[src]
fn decode<__D: Decoder>(d: &mut __D) -> Result<ItemKind, __D::Error>
🔬 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 Debug for ItemKind
[src]
impl Debug for ItemKind
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for ItemKind
[src]
impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for ItemKind
fn hash_stable<W: StableHasherResult>(
&self,
__ctx: &mut StableHashingContext<'a>,
__hasher: &mut StableHasher<W>
)
[src]
fn hash_stable<W: StableHasherResult>(
&self,
__ctx: &mut StableHashingContext<'a>,
__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?