pub enum ItemKind {
Show 23 variants
Module,
ExternCrate,
Use,
Struct,
StructField,
Union,
Enum,
Variant,
Function,
TypeAlias,
Constant,
Trait,
TraitAlias,
Impl,
Static,
ExternType,
Macro,
ProcAttribute,
ProcDerive,
AssocConst,
AssocType,
Primitive,
Keyword,
}Expand description
The fundamental kind of an item. Unlike ItemEnum, this does not carry any additional info.
Part of ItemSummary.
Variants§
Module
A module declaration, e.g. mod foo; or mod foo {}
ExternCrate
A crate imported via the extern crate syntax.
Use
An import of 1 or more items into scope, using the use keyword.
Struct
A struct declaration.
StructField
A field of a struct.
Union
A union declaration.
Enum
An enum declaration.
Variant
A variant of a enum.
Function
A function declaration, e.g. fn f() {}
TypeAlias
A type alias declaration, e.g. type Pig = std::borrow::Cow<'static, str>;
Constant
The declaration of a constant, e.g. const GREETING: &str = "Hi :3";
Trait
A trait declaration.
TraitAlias
A trait alias declaration, e.g. trait Int = Add + Sub + Mul + Div;
Impl
An impl block.
Static
A static declaration.
ExternType
types from an extern block.
Macro
A macro declaration.
Corresponds to either ItemEnum::Macro(_)
or ItemEnum::ProcMacro(ProcMacro { kind: MacroKind::Bang })
ProcAttribute
A procedural macro attribute.
Corresponds to ItemEnum::ProcMacro(ProcMacro { kind: MacroKind::Attr })
ProcDerive
A procedural macro usable in the #[derive()] attribute.
Corresponds to ItemEnum::ProcMacro(ProcMacro { kind: MacroKind::Derive })
AssocConst
An associated constant of a trait or a type.
AssocType
An associated type of a trait or a type.
Primitive
A primitive type, e.g. u32.
Items of this kind only come from the core library.
Keyword
A keyword declaration.
Items of this kind only come from the come library and exist solely
to carry documentation for the respective keywords.