Enum rustdoc::html::item_type::ItemTypeUnstable [-] [+] [src]

pub enum ItemType {
    Module,
    ExternCrate,
    Import,
    Struct,
    Enum,
    Function,
    Typedef,
    Static,
    Trait,
    Impl,
    TyMethod,
    Method,
    StructField,
    Variant,
    Macro,
    Primitive,
    AssociatedType,
    Constant,
}

Item type. Corresponds to clean::ItemEnum variants.

The search index uses item types encoded as smaller numbers which equal to discriminants. JavaScript then is used to decode them into the original value. Consequently, every change to this type should be synchronized to the itemTypes mapping table in static/main.js.

Variants

Module
ExternCrate
Import
Struct
Enum
Function
Typedef
Static
Trait
Impl
TyMethod
Method
StructField
Variant
Macro
Primitive
AssociatedType
Constant

Methods

impl ItemType

fn from_item(item: &Item) -> ItemType

fn from_type_kind(kind: TypeKind) -> ItemType

fn to_static_str(&self) -> &'static str

Trait Implementations

impl Display for ItemType

fn fmt(&self, f: &mut Formatter) -> Result

Derived Implementations

impl Clone for ItemType

fn clone(&self) -> ItemType

fn clone_from(&mut self, source: &Self)

impl PartialEq for ItemType

fn eq(&self, __arg_0: &ItemType) -> bool

fn ne(&self, __arg_0: &ItemType) -> bool

impl Copy for ItemType