pub(crate) enum ItemType {
Show 26 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,
}
Expand description
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/js/search.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§
Trait Implementations§
source§impl FromWithTcx<ItemType> for ItemKind
impl FromWithTcx<ItemType> for ItemKind
source§impl Ord for ItemType
impl Ord for ItemType
source§impl PartialOrd<ItemType> for ItemType
impl PartialOrd<ItemType> for ItemType
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moreimpl Copy for ItemType
impl Eq for ItemType
impl StructuralEq for ItemType
impl StructuralPartialEq for ItemType
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§
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
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 bytesImport
: 0 bytesStruct
: 0 bytesEnum
: 0 bytesFunction
: 0 bytesTypedef
: 0 bytesStatic
: 0 bytesTrait
: 0 bytesImpl
: 0 bytesTyMethod
: 0 bytesMethod
: 0 bytesStructField
: 0 bytesVariant
: 0 bytesMacro
: 0 bytesPrimitive
: 0 bytesAssocType
: 0 bytesConstant
: 0 bytesAssocConst
: 0 bytesUnion
: 0 bytesForeignType
: 0 bytesKeyword
: 0 bytesOpaqueTy
: 0 bytesProcAttribute
: 0 bytesProcDerive
: 0 bytesTraitAlias
: 0 bytes