Enum rustdoc::formats::item_type::ItemType [−][src]
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/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
Implementations
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for ItemType
impl UnwindSafe for ItemType
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
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