Enum syntax::ast::ItemKind [] [src]

pub enum ItemKind {
    ExternCrate(Option<Name>),
    Use(P<UseTree>),
    Static(P<Ty>, MutabilityP<Expr>),
    Const(P<Ty>, P<Expr>),
    Fn(P<FnDecl>, UnsafetySpanned<Constness>, AbiGenericsP<Block>),
    Mod(Mod),
    ForeignMod(ForeignMod),
    GlobalAsm(P<GlobalAsm>),
    Ty(P<Ty>, Generics),
    Enum(EnumDefGenerics),
    Struct(VariantDataGenerics),
    Union(VariantDataGenerics),
    Trait(IsAutoUnsafetyGenericsTyParamBoundsVec<TraitItem>),
    TraitAlias(GenericsTyParamBounds),
    AutoImpl(UnsafetyTraitRef),
    Impl(UnsafetyImplPolarityDefaultnessGenericsOption<TraitRef>, P<Ty>, Vec<ImplItem>),
    Mac(Mac),
    MacroDef(MacroDef),
}
🔬 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

🔬 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

🔬 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 use declaration (use or pub use) item.

E.g. use foo;, use foo::bar; or use foo::bar as FooBar;

🔬 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 (static or pub static).

E.g. static FOO: i32 = 42; or static FOO: &'static str = "bar";

🔬 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 constant item (const or pub const).

E.g. const FOO: i32 = 42;

🔬 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 (fn or pub fn).

E.g. fn foo(bar: usize) -> usize { .. }

🔬 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 declaration (mod or pub mod).

E.g. mod foo; or mod foo { .. }

🔬 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 (extern or pub extern).

E.g. extern {} or extern "C" {}

🔬 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!())

🔬 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 (type or pub type).

E.g. type Foo = Bar<u8>;

🔬 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 (enum or pub enum).

E.g. enum Foo<A, B> { C<A>, D<B> }

🔬 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 (struct or pub struct).

E.g. struct Foo<A> { x: A }

🔬 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 (union or pub union).

E.g. union Foo<A, B> { x: A, y: B }

🔬 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 Trait declaration (trait or pub trait).

E.g. trait Foo { .. }, trait Foo<T> { .. } or auto trait Foo {}

🔬 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 alias

E.g. trait Foo = Bar + Quux;

🔬 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 implementation.

E.g. impl Trait for .. {} or impl<T> Trait<T> for .. {}

🔬 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.

E.g. impl<A> Foo<A> { .. } or impl<A> Trait for Foo<A> { .. }

🔬 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 macro invocation.

E.g. macro_rules! foo { .. } or foo!(..)

🔬 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 macro definition.

Methods

impl ItemKind
[src]

[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 ItemKind
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for ItemKind
[src]

[src]

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

[src]

This method tests for !=.

impl Eq for ItemKind
[src]

impl Encodable for ItemKind
[src]

[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 ItemKind
[src]

[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 ItemKind
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for ItemKind
[src]

[src]

Formats the value using the given formatter. Read more