[−][src]Enum rustdoc::formats::item_type::ItemType

pub(crate) enum ItemType {
    Module,
    ExternCrate,
    Import,
    Struct,
    Enum,
    Function,
    Typedef,
    Static,
    Trait,
    Impl,
    TyMethod,
    Method,
    StructField,
    Variant,
    Macro,
    Primitive,
    AssocType,
    Constant,
    AssocConst,
    Union,
    ForeignType,
    Keyword,
    OpaqueTy,
    ProcAttribute,
    ProcDerive,
    TraitAlias,
}

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 html/static/main.js.

In addition, code in html::render uses this enum to generate CSS classes, page prefixes, and module headings. If you are adding to this enum and want to ensure that the sidebar also prints a heading, edit the listing in html/render.rs, function sidebar_module. This uses an ordering based on a helper function inside item_module, in the same file.

Variants

Module
ExternCrate
Import
Struct
Enum
Function
Typedef
Static
Trait
Impl
TyMethod
Method
StructField
Variant
Macro
Primitive
AssocType
Constant
AssocConst
Union
ForeignType
Keyword
OpaqueTy
ProcAttribute
ProcDerive
TraitAlias

Implementations

impl ItemType[src]

pub(crate) fn as_str(&self) -> &'static str[src]

Trait Implementations

impl Clone for ItemType[src]

impl Copy for ItemType[src]

impl Debug for ItemType[src]

impl Display for ItemType[src]

impl Eq for ItemType[src]

impl<'a> From<&'a Item> for ItemType[src]

impl From<TypeKind> for ItemType[src]

impl Ord for ItemType[src]

impl PartialEq<ItemType> for ItemType[src]

impl PartialOrd<ItemType> for ItemType[src]

impl Serialize for ItemType[src]

impl StructuralEq for ItemType[src]

impl StructuralPartialEq for ItemType[src]

Auto Trait Implementations

impl RefUnwindSafe for ItemType

impl Send for ItemType

impl Sync for ItemType

impl Unpin for ItemType

impl UnwindSafe for ItemType

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized, 
[src]

impl<T> Borrow<T> for T where
    T: ?Sized, 
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone, 
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithConstness for T[src]