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.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for ItemKind
impl<'de> Deserialize<'de> for ItemKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Copy for ItemKind
impl Eq for ItemKind
impl StructuralPartialEq for ItemKind
Auto Trait Implementations§
impl Freeze for ItemKind
impl RefUnwindSafe for ItemKind
impl Send for ItemKind
impl Sync for ItemKind
impl Unpin for ItemKind
impl UnwindSafe for ItemKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 1 byte
Size for each variant:
Module: 0 bytesExternCrate: 0 bytesUse: 0 bytesStruct: 0 bytesStructField: 0 bytesUnion: 0 bytesEnum: 0 bytesVariant: 0 bytesFunction: 0 bytesTypeAlias: 0 bytesConstant: 0 bytesTrait: 0 bytesTraitAlias: 0 bytesImpl: 0 bytesStatic: 0 bytesExternType: 0 bytesMacro: 0 bytesProcAttribute: 0 bytesProcDerive: 0 bytesAssocConst: 0 bytesAssocType: 0 bytesPrimitive: 0 bytesKeyword: 0 bytes